This topic describes how to quickly deploy a Docker environment on a simple application server, using an image from Alibaba Cloud. It also describes how to use Docker to start an NGINX container.
For more information about Docker, see What is Docker?
You can also deploy Docker manually. For more information, see Manually deploy Docker.
Procedure
Step 1: Deploy Docker
If you have purchased a simple application server, replace the image with a Docker application image to deploy it, when resetting the system. However, resetting the OS removes all system disk data. Before proceeding, back up your data. For more information, see Reset a Simple Application Server.
Go to the Servers page in the Simple Application Server console.
In the middle of the page, click Create Server.
On the Simple Application Server page, complete the configuration following the instructions. The following table describes the parameters.
NoteThe images and plans available may vary by region and instance type. The information on the Simple Application Server console buy page takes precedence.
Parameter
Example
Description
Images
Application Images: Docker
Image version: Docker 26.1.3
On the Apps Image tab, select Docker.

Region
Singapore
Select a region based on your geographical location to reduce network latency. You cannot change the region after the server is created. Proceed with caution.
ImportantSimple application servers outside the Chinese mainland such as China (Hong Kong) and Singapore regions use international bandwidth. High network latency may occur for accessing from regions inside the Chinese mainland. We recommend that you select the closest region from the geographical location of your user. For more information, see Regions and network connectivity.
Purchase Settings
Quantity: 1
Duration: 1 Month
Quantity: The number of servers. 1 by default.
Duration: The subscription duration. 1 month by default.
Monthly subscription: 1 month, 3 months, or 6 months.
Yearly subscription: 1 year, 2 years, or 3 years.
The Auto-renewal feature is enabled by default. This is to prevent service interruption. If you forget to renew, server will be released and impact your business. For more information, see Renew a server.
Monthly subscription: The renewal cycle is 1 month.
Yearly subscription: The renewal cycle is 1 year.
After the configuration, click Buy Now and follow the instructions to complete the payment.
Follow the instructions to complete the payment. if the status of the server changes to Running, the Docker environment is deployed successfully.

Step 2: Use Docker
Go to the Servers page in the Simple Application Server console.
On the Servers page, find the simple application server that you created from the Docker application image, and click the ID of the server.
On the Application Details tab, in the Docker Usage Procedure section, click Log on to the simple application server.
You can also view the Docker version, Docker status, and installation path on the Application Details tab.

In the Remote Connection dialog box, click Log on Now.
Use Docker within the simple application server.
In the following example, Docker pulls an NGINX image and starts an NGINX container.
Pull the latest NGINX image among the searched NGINX images to the simple application server.
sudo docker pull nginxQuery existing Docker images on the server.
sudo docker imagesIf this command is returned, the latest NGINX image is pulled to the simple application server.

Create an NGINX container and run the container in the background. Configure the NGINX container to use port
80of the server.sudo docker run --name <Container alias> --network host -d <Image name> (REPOSITORY)In this example, the image name is set to
nginx, and the container alias is set tonginx-test01.sudo docker run --name nginx-test01 --network host -d nginxNoteYou can run the
docker imagescommand to query the image name.Query the container.
sudo docker psThe query results are as follows:

Use a browser on your computer to access the
<Public IP address of the simple application server>.If this appears, the NGINX container is deployed successfully. If you cannot access the NGINX container, check whether port 80 is enabled. For more information, see Manage a firewall.
