问题:
I am trying to build a backup and restore solution for the Docker containers that we work with. 我正在尝试为我们使用的Docker容器构建备份和还原解决方案。
I have Docker base image that I have created, ubuntu:base , and do not want have to rebuild it each time with a Docker file to add files to it. 我有我创建的Docker基本映像ubuntu:base ,并且不想每次都必须使用Docker文件重建它来向其添加文件。
I want to create a script that runs from the host machine and creates a new container using the ubuntu:base Docker image and then copies files into that container. 我想创建一个从主机运行的脚本,并使用ubuntu:base Docker映像创建一个新容器,然后将文件复制到该容器中。
How can I copy files from the host to the container? 如何将文件从主机复制到容器?
解决方案:
参考一: https://stackoom.com/question/1Y7DT/将文件从主机复制到Docker容器参考二: https://oldbug.net/q/1Y7DT/Copying-files-from-host-to-Docker-container
来源:oschina
链接:https://my.oschina.net/u/4428122/blog/4306236