学习docker 入门命令笔记

课程:http://www.imooc.com/learn/824

1. 命令

docker version
docker images
docker pull hello-world
docker run hello-world
docker pull nginx:latest
docker run nginx
docker run -d nginx
docker ps
docker exec -it 126 bash
docker stop 126
docker run -d -p 8080:80 nginx:latest
netstat -na|grep 8080
docker run -d -P nginx:latest
vi Dockerfile
docker build . -t jpress:latest
docker run -d -p 8888:8080 jpress
docker pull hub.c.163.com/library/mysql:latest
docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=jpress hub.c.163.com/library/mysql:latest

2. Dockerfile

创建自己的镜像jpress

from hub.c.163.com/library/tomcat

maintainer lucian xf111247@163.com

copy jpress.war /usr/local/tomcat/webapps 

你可能感兴趣的:(docker,docker)