Docker笔记
查看docker镜像列表:
docker image ls
查看docker容器:
docker container ls
拉取docker镜像:
docker pull image-name:tag-name
eg: docker pull mysql:5.7.26
运行一个docker容器:
docker container run –name your-container-name -d/-it image-name:tag-name sh
eg: docker run –name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag sh
进入正在运行的docker容器:
docker exec -it container-name/container-id
eg: docker exec -it docker-mysql-5.7.26 sh