From a3c73644defa79535cfc592c3037a32f8e19cacd Mon Sep 17 00:00:00 2001 From: B13nch3n <b13nch3n_01@theb-si.de> Date: Tue, 18 Oct 2022 17:29:00 +0200 Subject: [PATCH] Add build command for development container --- projects/docker/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/projects/docker/README.md b/projects/docker/README.md index 958a5d3..6e51bea 100644 --- a/projects/docker/README.md +++ b/projects/docker/README.md @@ -111,7 +111,7 @@ Be aware of the `touch .history` command before `docker run`. This makes sure a ### 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: +The [Dockerfile](./Dockerfile) has an additional build argument, `ADD_DEV`. If set to `YES`, the following development tools are added to the Docker image: - [Emacs](https://www.gnu.org/software/emacs/) @@ -121,6 +121,14 @@ The [Dockerfile](./Dockerfile) has an additional build argument, `ADD_DEV`. If s None of these are needed to run a translation script. +The build argument is just added to the `docker build` call: + +```terminal +$ # DOCKER_BUILDKIT=1 is only needed for older versions of Docker. +$ DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile --build-arg MMCIF_USER_ID=1234 --build-arg ADD_DEV=YES -t converter:latest . +$ +``` + 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 @@ -132,5 +140,6 @@ $ 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 + LocalWords: CONVERTERCMD cif ASFVG BUILDKIT pwd DEV Pylint pyproject + LocalWords: toml pylint --> -- GitLab