Copying files from Docker container to host

后端 未结 18 2478
小蘑菇
小蘑菇 2020-11-22 13:39

I\'m thinking of using Docker to build my dependencies on a Continuous Integration (CI) server, so that I don\'t have to install all the runtimes and libraries on the agents

18条回答
  •  甜味超标
    2020-11-22 14:13

    If you just want to pull a file from an image (instead of a running container) you can do this:

    docker run --rm cat >

    This will bring up the container, write the new file, then remove the container. One drawback, however, is that the file permissions and modified date will not be preserved.

提交回复
热议问题