diff --git a/projects/docker/README.md b/projects/docker/README.md index 36a0d910829b8f97a9c0f021186c5ee41300179f..d79f2e6f59b26dd12e1260d20c5633c44155259c 100644 --- a/projects/docker/README.md +++ b/projects/docker/README.md @@ -16,9 +16,32 @@ This section describes three use cases of the Docker container (including a buil ### Prerequisites +For building the Docker image, you need a local copy of the [Git repository](/.). After that, this guide assumes you are in the [`projects`](projects/) subdirectory (we skip the output of the commands here): + +```terminal +$ git clone https://git.scicore.unibas.ch/schwede/modelcif-converters.git modelcif-converters.git +$ cd modelcif-converters.git/projects +$ +``` + +Since the Docker container will run as a dedicated, non-root user, it is advisable to create this user with the ID of your local user. That way, file permission issues will be avoided. Get your user ID with the following command and note it down - it will be needed in the build steps: + +```terminal +$ whoami +localuser +$ id +uid=12345(localuser) ... +$ +``` + +Look for the `uid` in the output of `id`. In the example above, `12345` is the ID of user `localuser`, currently logged in and executing the commands. + +One last thing that is needed for the example runs of the Docker container is data. For simplicity, we assume that a directory `/home/user/models` exists on the local computer executing a converter, full of modelling data. + <!-- - Do single example call - show how to loop +- all build use local UID! 1. App like - special build @@ -29,6 +52,9 @@ This section describes three use cases of the Docker container (including a buil 3. Interactive shell - works with every build - most complicated run bit +- include history! +4. Development environment +- include pylint, black and pyproject.toml --> <!-- @@ -47,5 +73,5 @@ docker run --rm -i -v /Users/stefan/.bash_profile:/home/mmcif/.bash_profile -v / --> -<!-- LocalWords: TOC +<!-- LocalWords: TOC modelcif cd whoami localuser uid -->