Professional Documents
Culture Documents
Docker Cheat Sheet: Process Management Images/Repository
Docker Cheat Sheet: Process Management Images/Repository
# Create a volume
docker volume create <volume>
Troubleshooting
# Delete a volume # Show the logs of a container
docker volume rm <volume> docker logs <container>
# Delete all volumes not attached to a container # Show timestamps on docker logs
docker volume prune docker logs -t <container>
# Copy file or folder from a docker container to host machine # Show a 'top' view of processes running on a container
docker cp <container>:<container_dir> <local_dir> docker top <container>
# Copy file or folder from local machine onto a container # Show a 'top' view of all docker containers
docker cp <local_dir> <container>:<container_dir> docker stats
# Map a local port to a docker instance # Show any files that have changed since startup
docker run -d -p 127.0.0.1:<local_port>:<docker_port> <image> docker diff <container>
# List the ports a docker container is running on # Connect to an already running container
docker port <container> docker attach <container>