docker_cheat_sheet
This is an old revision of the document!
Docker Check Sheet
Getting Started
docker run --name repo alpine/git clone https://github.com/docker/getting-started.git | Clone |
docker cp repo:/git/getting-started/ . | Clone |
cd getting-started | |
docker build -t docker101tutorial . | Build |
docker run -d -p 80:80 --name docker-tutorial docker101tutorial | Run-d - run the container in detached mode (in the background)-p 80:80 - map port 80 of the host to port 80 in the containerdocker/getting-started - the image to use |
docker ps | List running Docker processes. |
docker stop 6307dc32ab8e | Stop a Docker process. |
docker rm 6307dc32ab8e | Delete a Docker process. |
docker rm -f 6307dc32ab8e | Stop and delete a Docker process.-f - force |
docker exec aab6865570a6 cat /data.txt | Run the cat/data.txt command inside a running Docker process. |
docker volume create todo-db | Create a volume called todo-db . |
docker network create todo-app | Create a network called todo-app . |
docker_cheat_sheet.1635972620.txt.gz · Last modified: 2021/11/04 21:50 (external edit)