From b708b0e2dacabba10f1bfd71946d593cb159e9d9 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 24 Nov 2020 13:59:51 +0100 Subject: [PATCH] [web] Added docs on Docker usage. --- .../docs/userguide/basics/container.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/web/content/docs/userguide/basics/container.md b/web/content/docs/userguide/basics/container.md index 6b79599e737..0724896f0f2 100644 --- a/web/content/docs/userguide/basics/container.md +++ b/web/content/docs/userguide/basics/container.md @@ -81,3 +81,31 @@ Singularity ogs-6.2.2-serial.sif:...> exit * `singularity exec --app ogs ogs-xxx-gui-xxx.sif DataExplorer` You may use this container on e.g. `envinf1` with X11 forwarding (`ssh -XY envinf1`). + +---- + +## With Docker + +Although Singularity is the preferred container runtime you can use [Docker](https://www.docker.com) too. + +### Prerequisites + +* A running [installation of Docker](https://docs.docker.com/get-docker/) + +### Run OGS inside a Docker container + +* Get the container: `docker pull registry.opengeosys.org/ogs/ogs/ogs-serial` +* Start interactive container session: `docker run --rm -it registry.opengeosys.org/ogs/ogs/ogs-serial` +* Run ogs: `/scif/apps/ogs/bin/ogs --version` +* Exit the container: `exit` + +You will notice that the interactive session in your container is isolated from your host, i.e. you do not have access to files on your host. You need to explicitly [mount](https://docs.docker.com/storage/bind-mounts/) them on `docker run`: + +```bash +mkdir ~/ogs_out +docker run --rm -it -v $HOME/code/ogs6/ogs/Tests/Data:/tmp/data:ro -v $HOME/ogs_out:/tmp/out registry.opengeosys.org/ogs/ogs/ogs-seria +/scif/apps/ogs/bin/ogs -o /tmp/out /tmp/data/Elliptic/cube_1x1x1_SteadyStateDiffusion/cube_1e4.prj +exit +ls ~/ogs_out +# [shows ogs generated output files] +``` -- GitLab