- The installation of docker can be seen in the previous article
- Here my docker has been installed, and it's time to do the mirroring; the mirroring here is what I used to do it myself. Although the mirroring is a bit big, it is better than doing it by myself.
- My image is placed in the Alibaba Cloud Container Image Repository
- Then start dry:
- apache-php image:
docker pull registry.cn-hangzhou.aliyuncs.com/vlson/centos-apache-php:v1
- MySQL image:
docker pull registry.cn-hangzhou.aliyuncs.com/vlson/centos-mysql:v1
- Create a container
#apache-phpcontainer docker run -itd --name apache-php registry.cn-hangzhou.aliyuncs.com/vlson/centos-apache-php:v1 /bin/bash #mysqlcontainer docker run -itd --name mysql registry.cn-hangzhou.aliyuncs.com/vlson/centos-mysql:v1 /bin/bash
- Also, when creating a container, it is best to map the port and specify it with -p. You can use -p to bind multiple ports in a row. For example:
docker run -itd --name apache-php -p 80:80 registry.cn-hangzhou.aliyuncs.com/vlson/centos-apache-php:v1 /bin/bash
Alibaba Cloud server docker gets the image
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325083259&siteId=291194637
Recommended
Ranking