Skip to content
Snippets Groups Projects
Commit 68d30bb8 authored by B13nch3n's avatar B13nch3n
Browse files

Describe how to get the development version of the container

parent 20dea694
Branches
No related tags found
No related merge requests found
...@@ -10,7 +10,9 @@ The [`docker`](projects/docker/) directory does not host a modelling project. It ...@@ -10,7 +10,9 @@ The [`docker`](projects/docker/) directory does not host a modelling project. It
Adding projects: Adding projects:
- file permissions for the translation script (755) so it can be executed by any - file permissions for the translation script (755) so it can be executed by any
user 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
--> -->
...@@ -108,28 +108,28 @@ In the interactive shell, the `convert2modelcif` command is available, as well a ...@@ -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. 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: TOC modelcif cd whoami localuser uid arg CONVERTERSCRIPT
LocalWords: CONVERTERCMD cif ASFVG BUILDKIT pwd LocalWords: CONVERTERCMD cif ASFVG BUILDKIT pwd
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment