Skip to content

Useful commands in Docker

Sophia Teslyuk edited this page Mar 28, 2018 · 5 revisions

Useful commands in Docker

  • To get info about accessible containers in Docker
    docker ps --format "{{.Names}}"

  • To import data files from personal computer to Docker container
    docker cp c:\path\to\local\file container_name:/path/to/target/dir/


Error response from daemon: Conflict. The container name is already in use by container. You have to remove (or rename) that container to be able to reuse that name.

  • To checkout if docker container exists in the system
    docker ps -a

  • Remove container, if it exists in the system
    docker rm container_name

  • Discard uncommitted changes
    git reset --hard

Clone this wiki locally