Container compiles cantera from source (using separate layers for tool chain, source compilation and testing).
The workflow was tested on a Docker CE installation.
Build docker image with tool chain (ubuntu + buildessentials, etc.).
$ cd ubuntu-toolchain
$ docker build -t ubuntu-toolchain .
$ cd ..
Build docker image that compiles cantera from source (i.e. this will take a while).
$ cd cantera-src
$ docker build -t cantera-src .
$ cd ..
Build third layer for testing (avoiding container with root privileges)
$ cd cantera-testing
$ docker build -t cantera-testing .
$ cd ..
Initialize the container
$ docker run -it cantera-testing
Verify that everything works
ctuser@<container_ID>:~$ cp .python-examples/surface_chemistry/catalytic_combustion.py .
ctuser@<container_ID>:~$ python catalytic_combustion.py
TODO: this no longer works
A quick example for a running GUI, based on this
$ cd gui
$ docker build -t gui-app .
On Wayland, additional measures are required allow local user access to to x host, and retrieve the user id
$ xhost +SI:localuser:$(id -un)
$ id -u
Then start a container using:
$ docker run --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
--user=$(id -u):$(id -g) gui-app
Start docker container, using a bind mount to the local folder
$ docker run -it --name <container_name> --mount type=bind,source="$(pwd)",target=/<folder> <image_name>
- wmichalak/canteracontainer: conda cantera container
- danielle-mustillo/docker-cantera: conda cantera container with jupyter
- Compilation within Docker: Hello World in C++, with Docker
- Intro to Docker: Docker tutorial series
- Privileges: Processes in Containers ... Not Run As Root
- Layers: Digging into Docker layers
- Permissions: shared permissions