docker_cheat_sheet
This is an old revision of the document!
Table of Contents
Docker Check Sheet
Getting Started
Clone
docker run --name repo alpine/git clone https://github.com/docker/getting-started.git | |
docker cp repo:/git/getting-started/ . |
Build
A Docker image is a private file system just for your container. It provides all the files and code your container needs.
cd getting-started | |
docker build -t docker101tutorial . |
Run your first container
Start a container based on the image you built in the previous step. Running a container launches your application with private resources, securely isolated from the rest of your machine.
docker run -d -p 80:80 --name docker-tutorial docker101tutorial | -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_cheat_sheet.1635908867.txt.gz · Last modified: 2021/11/04 04:07 (external edit)