docker ps //List running containers docker ps --all //List all containers docker system prune //Remove unused data docker system prune --all //Remove all unused images not just dangling ones docker run {IMAGE} //combining 'docker create' & 'docker start' docker run -d {IMAGE} // Run container in background and print container ID docker run -p {systemport}:{dockerport} {IMAGE} // Map Port of the OS to the dockerport docker run -it {IMAGE} //Input output docker run -it {IMAGE} sh //Run docker container and shell into it docker exec -it {IMAGE} sh //Shell into running docker container docker build . //Build docker image with random id docker build -t {REPO}/{TAGNAME} . //Build docker image with random id docker stop {IMAGE} //Stop container from running docker-compose up //Execute docker compose docker-compose up --build // Rebuild Docker container and execute docker compose docker-compose -d {IMAGE} // Run container in background and print container ID docker-compose down //Stop container from running
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter