In order to copy to a container you need to:
- Find the container ID
- Open PowerShell window
- run the following command:
docker ps
- Take a note of CONTAINER ID
- Stop the container
- Copy a file to the container using docker CP Command. Eg:
docker cp xxxxxxxxxxx:c:/testfile.txt c:/inetpub/wwwroot/
- See docker cp for more info
In order to commit the container:
- Run the docker commit command. Eg:
docker commit xxxxxxxxxxx my-image-name:my-tag
- See docker commit for more info
Note: You should only use this method to test minor changes to an image. If you are building a final image you should minimize the number of changes (i.e. copies or commands) you make as this adds extra layers. Rather than this, you should copy all files on to base image in one transaction.