Deploy a Docker environment on a Simple Application Server using the Docker application image from Alibaba Cloud, and start an Nginx container.
-
Learn more about Docker in the Docker Overview.
-
To deploy Docker manually, see Manually deploy Docker.
Procedure
Step 1: Deploy Docker
If you already have a Simple Application Server, deploy Docker by selecting the Docker application image when you reset the system. Resetting the system erases all data on the system disk. Back up your data before you proceed. 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, configure the following parameters.
NoteAvailable images and plans vary by region and instance type. The buy page in the console takes precedence.
Configuration Item
Example
Description
Servers
-
Instance family: General-purpose
-
Select an instance family: Options include general-purpose, Multi-IP, International, and Large-capacity. Instance families.
-
Select a plan: Click
to view more plans. Each plan bundles vCPUs, memory, a system disk, and a data transfer plan. Instance specifications.ImportantTo create a Windows instance, select a plan that provides a system disk larger than 40 GiB.
Image
-
Application Image: Docker
-
Image Version: Docker 26.1.3
On the Application Images tab, select the Docker image.

Region
Singapore
Select a region close to your target users to reduce network latency. You cannot change the region after the instance is created.
ImportantInstances in regions outside the Chinese mainland, such as China (Hong Kong) and Singapore, use international bandwidth, which may cause high latency from within the Chinese mainland. Select the region closest to your target users. Regions and network connectivity.
Purchase Settings
-
Quantity: 1
-
Duration: 1 Month
-
Quantity: the number of instances to purchase. Default: 1.
-
Duration: the subscription duration. Default: 1 month.
ImportantInstances hosting web services in the Chinese mainland require an ICP filing with a subscription duration of 3 months or longer (including renewals). Domain name filing.
-
Monthly subscription: 1 month, 3 months, or 6 months.
-
Yearly subscription: 1 year, 2 years, or 3 years.
Enable Auto-renewal is enabled by default to prevent disruptions from expired subscriptions. Auto-renewal.
-
For monthly subscriptions, the renewal period is one month.
-
For yearly subscriptions, the renewal period is one year.
-
-
-
Click Buy Now and complete the payment.
When the server status changes from Pending to Running, Docker deployment is complete.

Step 2: Use Docker
-
Go to the Servers page in the Simple Application Server console.
-
On the Servers page, find the Simple Application Server created from the Docker image and click its instance ID.
-
Click the Application Details tab. In the Docker Usage section, click Log on to the simple application server..
The application details also show the Docker version, status, and installation path.

-
In the Remote Connection dialog box, click Log on Now.
-
Use Docker on the server.
The following steps use an Nginx container as an example.
-
Pull the Nginx image.
sudo docker pull nginx -
View local images.
sudo docker imagesThe following output indicates that the Nginx image is available locally.

-
Create and run an Nginx container in the background, binding it to port
80of the server.sudo docker run --name <container_alias> --network host -d <image_name>(REPOSITORY)In this example, the image name is
nginxand the container alias isnginx-test01. Sample command:sudo docker run --name nginx-test01 --network host -d nginxNoteUse the image name returned by the
docker imagescommand. -
View running containers.
sudo docker psSample output:

-
In a browser, access the
public IP address of the Simple Application Server.If the following page appears, the Nginx container is deployed. If you cannot access Nginx, verify that port 80 is enabled in the firewall settings. Set up a firewall.

-

