How can I copy a file from one folder to another folder within a container in Docker?

I already found ways for moving file between host and container but was not able to figure out on how to moves files within same container using YML. Can some one help me on this?

  • “Empty reply from server” when trying to run webpack-dev-server inside a docker container with docker-compose on windows running docker-toolbox
  • Docker php url access
  • Nodemon Docker ECONNREFUSED error
  • Jenkins build Docker raise error Unrecognized field “ExecDriver”
  • Docker php excel error (php://output) i/o stream
  • How to get remote access to a private docker-registry?
  • Using Chef to configure Docker image?
  • docker volume plugin not properly detected by docker engin
  • Dockerfile: COPY folder inside folder
  • webpack-dev-server hot loading not working with boot2docker
  • Correct pulling edxops/forums way
  • Running commands inside Docker Container
  • One Solution collect form web for “How can I copy a file from one folder to another folder within a container in Docker?”

    You can use ssh command. First find IP of each docker container and then ssh into one terminal to transfer file.

    man scp
    The very basic usage:
    
    scp remote_user@remote_host:/path/to/remote/file /path/to/local/file
    and vice versa:
    
    scp /path/to/local/file remote_user@remote_host:/path/to/remote/file
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.