Novice using docker under win10
1: Download docker for win
2: Check out the docker documentation https://github.com/widuu/chinese_docker
3: Download the mirror using Alikuai. . https://dev.aliyun.com/search.html?spm=5176.1972344.0.1.KRcLZ8
4: Download the mirror, I downloaded the centos mirror
docker pull centos Here you can configure the use of fast addresses to fill in the fast addresses into mirrors
docker images View image id
docker run -i -t centos /bin/bash to enter interactive mode
yum install httpd / nginx
yum install php / php-fpm
Install the development environment
exit exit
docker ps to view the container id that docker just ran
docker container id new name (centos/httpd)
5: Test access to web services in docker under win
docker run -i -t -p 8080:80 centos/httpd //-p 8080:80 Map access to port 8080 of the host to port 80 in docker
/httpd start apache
Visit 127.0.0.1:8080 under win to see the default welcome page for installing apache in centos.
6 Mount the directory under win
It is preferred to select the drive letter where the directory is located in the docker settings
In fact, the hint here is very obvious.
docker run -i -t -v d:/test:/data -p 8080:80 centso/httpd
/ cd / data
/ ls
You can see the contents of the mount directory, a rowing boat
After configuring the virtual host in docker, a linux web development can be used.