From a844c82f1189445145c0fca3410ec74b3ad99652 Mon Sep 17 00:00:00 2001
From: B13nch3n <b13nch3n_01@theb-si.de>
Date: Thu, 6 Oct 2022 21:37:09 +0200
Subject: [PATCH] Docker instructions, prerequisites

---
 projects/docker/README.md | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/projects/docker/README.md b/projects/docker/README.md
index 36a0d91..d79f2e6 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
  -->
-- 
GitLab