Search code examples
dockerdockerfileboot2docker

How can i upload data to docker (container)?


I want to upload a .txt file to a container so later I can copy that file to paste it in a different container but I am new using docker and the manual is too complicated to understand. Can someone help me? I am using a windows 10 computer.

Thanks! Sarah


Solution

  • you can do it using

    docker cp

    see the doc

    https://docs.docker.com/engine/reference/commandline/cp/

    you can also use netcat, see for example

    https://github.com/chilcano/docker-netcat

    if your container uses a volume, this is another way to do

    https://docs.docker.com/engine/tutorials/dockervolumes/