How to copy files from host to Docker container?

前端 未结 30 3050
南方客
南方客 2020-11-22 06:58

I am trying to build a backup and restore solution for the Docker containers that we work with.

I have Docker base image that I have created, ubuntu:base

30条回答
  •  暖寄归人
    2020-11-22 07:36

    1. Create a new dockerfile and use the existing image as your base.

      FROM myName/myImage:latest
      
      ADD myFile.py bin/myFile.py
      
    2. Then build the container:

      docker build .
      

提交回复
热议问题