From 68d30bb8dd3492bfc331d2ba964024b2b862b836 Mon Sep 17 00:00:00 2001
From: B13nch3n <b13nch3n_01@theb-si.de>
Date: Tue, 18 Oct 2022 17:24:26 +0200
Subject: [PATCH] Describe how to get the development version of the container

---
 projects/README.md        |  4 +++-
 projects/docker/README.md | 42 +++++++++++++++++++--------------------
 2 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/projects/README.md b/projects/README.md
index 405acba..8e5fb91 100644
--- a/projects/README.md
+++ b/projects/README.md
@@ -10,7 +10,9 @@ The [`docker`](projects/docker/) directory does not host a modelling project. It
 Adding projects:
 - file permissions for the translation script (755) so it can be executed by any
   user
+- mention .dockerignore in projects README.md, like when adding projects consider..., add a reference to it, in the docker/README.md
+
 -->
 
-<!--  LocalWords:  README
+<!--  LocalWords:  README dockerignore
  -->
diff --git a/projects/docker/README.md b/projects/docker/README.md
index ea4f892..958a5d3 100644
--- a/projects/docker/README.md
+++ b/projects/docker/README.md
@@ -108,28 +108,28 @@ In the interactive shell, the `convert2modelcif` command is available, as well a
 
 Be aware of the `touch .history` command before `docker run`. This makes sure a file `.history` exists before starting the Docker container. If the file does not exist, Docker will create a directory `.history` itself but that does not record the bash command history.
 
-<!--
-- Do single example call
-- show how to loop
-- all build use local UID!
-
-3. Interactive shell
-4. Development environment
-- include pylint, black and pyproject.toml
--->
-
-<!--
-build:
-- execute: docker build -f docker/Dockerfile -t converter .
-- mention dev stuff
-- mention .dockerignore in projects readme, like when adding projects consider..., add a reference to it, here
-
-run interactive shell for development:
-- make sure files exist: /Users/stefan/Projects/ma-converters.git/projects/pointmutations-haddock/.docker-bash-history
-- execute:
-docker run --rm -i -v /Users/stefan/.bash_profile:/home/mmcif/.bash_profile -v /Users/stefan/.bash_aliases:/home/mmcif/.bash_aliases -v /Users/stefan/.bashrc:/home/mmcif/.bashrc -v /Users/stefan/Projects/ma-converters.git/projects/pointmutations-haddock/.docker-bash-history:/home/mmcif/.bash_history -v /Users/stefan/Projects/ma-converters.git/:/develop -t mmcifconverter:20220427 bash
 
- -->
+### Build the development Docker container
+
+The [Dockerfile](./Dockerfile) has an additional build argument, `ADD_DEV`. If set to `YES`, the follwoing development tools are added to the Docker image:
+
+- [Emacs](https://www.gnu.org/software/emacs/)
+
+- [Black](https://black.readthedocs.io/en/stable/)
+
+- [Pylint](https://pylint.org)
+
+None of these are needed to run a translation script.
+
+For working on a translation script, it is convenient to mount the complete Git repository when running the Docker container interactively. This makes sure `pyproject.toml` is available from the repository root to `black` and `pylint`:
+
+```terminal
+$ touch .history
+$ docker run --rm -i -t -v /home/user/models:/data -v $HOME/.bashrc:/home/mmcif/.bashrc -v $(pwd)/.history:/home/mmcif/.bash_history -v $(pwd)/../:/develop -t converter:latest bash
+$
+```
+
+In the session, the Git repository can be found in `/develop`.
 
 <!--  LocalWords:  TOC modelcif cd whoami localuser uid arg CONVERTERSCRIPT
       LocalWords:  CONVERTERCMD cif ASFVG BUILDKIT pwd
-- 
GitLab