diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-08-25 23:03:01 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2020-08-25 23:03:01 +0100 |
commit | 9a0d968cde844304acc6c48f107184b71ce304fc (patch) | |
tree | 31fd434d677a497b5df7ad1a0f05c880ebad40d4 | |
parent | 9573d4e4d4754e629b73be4bd6846a049d57f427 (diff) |
README.md: added explanation on copying files from Docker image
When building Maneage inside a Docker container, in the end the users want
to extract the final outputs from the container into their host operating
system to inspect more comfortably. So with this commit, a short
examplanation has been added on how to do this.
We also noticed that it is much better if the 'Dockerfile' is stored and
run in an empty directory, otherwise, it will start parsing the full
directory and its subdirectories as the docker image's environment.
-rw-r--r-- | README.md | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -343,10 +343,14 @@ MB), not the full TeXLive collection! 7. **Build the Docker image:** The `Dockerfile` is now ready! In the terminal, go to its directory and run the command below to build the - Docker image. Just set a `NAME` for your project and note that Docker - only runs as root. + Docker image. We recommend to keep the `Dockerfile` in **an empty + directory** and run it from inside that directory too. This is because + Docker considers that directories contents to be part of the + environment. Finally, just set a `NAME` for your project and note that + Docker only runs as root. ```shell + sudo su docker build -t NAME ./ ``` @@ -402,6 +406,17 @@ docker container list docker commit XXXXXXX NEW-IMAGE-NAME ``` +#### Copying files from the Docker image to host operating system + +The Docker environment's file system is completely indepenent of your host +operating system. One easy way to copy files to and from an open container +is to use the `docker cp` command (very similar to the shell's `cp` +command). + +```shell +docker cp CONTAINER:/file/path/within/container /host/path/target +``` + |