Add basic information on Docker

master
Nathan Steel 5 years ago
parent dff62c93dc
commit b6f7296522

@ -2,6 +2,10 @@
# Make new container # Make new container
docker run -d -p 80:80 --name <container_name>
-v pc_location:docker_location
# Start/Stop containers # Start/Stop containers
docker start <container> docker start <container>
@ -11,3 +15,8 @@
# Remove exisit containers # Remove exisit containers
docker rm <container> docker rm <container>
# List containers
docker container ls

@ -0,0 +1,23 @@
# Make Volumes
`docker volume create <volume_name>`
# List Volumes
`docker volume ls`
# Inspect Volume
`docker volume inspect <volume_name>`
# Remove Volume
`docker volume rm <volume_name>`
# Volume Location
# Start a container with a volume
# e.g. mounting volume to container's /app folder
`--mount source=<volume_name>, target=/app`
`docker inspect <container>` can be used to check if the volume is mounted
to the Mounts section
# Remove volume from container
Note, this doesn't remove the volume itself. Just the link to container
`docker stop <container>`
`docker container rm <container>`
Loading…
Cancel
Save