Docker - Mac research log
Table of Contents
#
Docker - Mac research log
##
Register Docker Hub
##
Use Kitematic
##
Install Ubuntu
Search ubuntu on docker hub
Run command
docker pull ubuntu
###
Use docker images
docker images
docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu latest 07f8e8c5e660 3 weeks ago 188.3 MB
###
build dockerfile
docker build . -t ubuntu_dev:16.04 -f local.Dockerfile
###
run container
docker run -t -i ubuntu /bin/bash
docker run -t -i ubuntu /bin/bash
root@b0cdeb409841:/#
###
docker run
docker run -idt --name <container name> -v <mount absolute path or ~ path>:<docker path> <IMAGE>:<TAG>
###
end container
exit
###
show container
docker ps -a
###
show running container
docker ps
###
show images
docker images
###
enter docker container
docker exec -it <container id> bash
###
show log
docker logs <container id>