• 8 September 2024

Using ArvanCloud Container Service, you can deploy any application with any programming language or level of complexity on the cloud infrastructure. Application deployment on the ArvanCloud container is possible in three ways:

  1. Direct conversion of source code available in GitHub or Gitlab into an executable image (S2I)
  2. Using Dockerized application format or Dockerhub official images
  3. Writing the Kubernetes manifest file

This tutorial will discuss deploying the software with Docker image and deploying a Vue.js front-end application on the cloud infrastructure.

Docker Image Deployment

Prerequisites:

  • Installing Docker on the system
  • Dockerhub account

To install Docker, you can use this link and install Docker according to your operating system.

In this section, we will deploy the application we built using Docker Image on the cloud. For this, we must first dockerize the app and place the Docker image in a Dockerhub repository, and then just enter the name of the image in the ArvanCloud panel and deploy the application. You can use the S2I guide to check how to build the application.

Dockerizing the Application

To build the image, we need to add a Dockerfile to the root of the project and add the following commands to it (source link):

Then in the root folder of the project, we create the image:

To make sure the process is correct, we run the image:

Check the localhost:8080 address and test the created container:

This image is now deployable.

Creating a Dockerhub Account and Repo and Pushing the Image

If you have yet to create a DockerHub account, you need to create an account in DockerHub. After creating the account, build a new repository with a name of your choice. For example, we create a public repo called hellovue:

Log in to the Docker account and push the image to the defined repo:

After pushing, you can see your image on the docker hub:

Docker Image Deployment on the Cloud

To deploy the image through the user panel, we click on the application build after selecting the desired project in the cloud container product. Then, on the application creation page, choose Docker image and then the public image and enter the name of the image available in Dockerhub.

In the Image URL field, just enter the name of the image available in Dockerhub:

The following steps of installing the application in ArvanCloud’s user panel can be done in the same way as other applications and in the s2i way. To check these steps, you can use the Vue.js application deployment guide with s2i.

After some time, the application becomes active, and we can access the application using the subdomain that we defined in advance: