Docker and Kubernetes

Copy files into and out of a container

Move a file between your computer and a running container with docker cp.

Fill these in once
  1. Copy a file into the container
    Terminal
    docker cp config.json my-app:/tmp/
  2. Copy a file out of the container
    Terminal
    docker cp my-app:/tmp/config.json .
  1. Copy a file into the container
    Terminal · Ubuntu / Debian
    docker cp config.json my-app:/tmp/
  2. Copy a file out of the container
    Terminal · Ubuntu / Debian
    docker cp my-app:/tmp/config.json .
  1. Copy a file into the container
    PowerShell
    docker cp config.json my-app:/tmp/
  2. Copy a file out of the container
    PowerShell
    docker cp my-app:/tmp/config.json .