06 November 2018

If you need to upload a file into a running Docker container you can do this as follows

cat missing_data.sql | docker exec -i <your container name> sh -c 'cat >/missing_data.sql'

Afterwards the file is located inside the container at /missing_data.sql

Have fun!


Tags: docker