MSNCodeSNIPPETS← msncode.dev
snippets/docker

Run Container with Volume

Mount a local directory into a container

dockerbashvolumemount
BASH
docker run -v $(pwd):/app -w /app node:18 npm install

More docker snippets

Build Image with Tag

Build a Docker image with a custom name

Clean Everything (Dangling + Stopped)

Remove stopped containers, dangling images, and unused networks

Copy File to Container

Copy a file from host into a running container

Enter a Running Container

Get a shell inside a running Docker container