What do you think? Discuss, post comments, or ask questions at the end of this article [More about me]

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Just some basic docker commands.

Guide

Manage containers

List containers

Show running:

docker container ls

Show all:

docker container ls --all

Start / stop / restart container

docker <start|stop|restart> <container>

List container port mappings 

docker port <container>

Copy file(s) from container to host

docker cp <container>:/file/path/within/container /host/path/target

Interactively log into container with bash

docker exec -it <container> /bin/bash

References

  1. https://docs.docker.com/
  2. https://stackoverflow.com/questions/22049212/copying-files-from-docker-container-to-host

  • No labels