Skip to content

Instantly share code, notes, and snippets.

@multidis
Created September 5, 2015 01:40
Show Gist options
  • Select an option

  • Save multidis/ac8f867401e67b13d039 to your computer and use it in GitHub Desktop.

Select an option

Save multidis/ac8f867401e67b13d039 to your computer and use it in GitHub Desktop.
File copy workaround from host to docker container (`docker cp` works from container to host, not other way around).
#https://forums.docker.com/t/will-docker-cp-command-work-for-copying-files-from-host-to-a-container/2022/2
cat /local/file/path | docker exec -i <running-container-id> sh -c 'cat > /inside/docker/file/path'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment