Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-docker
Commits
2550309b
Commit
2550309b
authored
Feb 28, 2017
by
Timo Koch
Browse files
Add readme
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
0 → 100644
View file @
2550309b
Using DuMux in a Docker container
==================================
This repository contains the Dockerfiles to build Docker images. The Docker
images can be found on the
[
Dumux Docker Hub
](
https://hub.docker.com/u/dumux/
)
.
Using these Docker images you can spin up Docker containers to run DuMux.
Running with docker-compose
*****************************
The easiest is starting the container using docker-compose.
Create a YAML file called
`docker-compose.yml`
(default recognized by docker-compose) or choosing
a custom name with the following content.
```
yaml
# Starts a dumux container with graphic support
dumux
:
image
:
dumux:latest
container_name
:
'
dumux'
volumes
:
-
/tmp/.X11-unix:/tmp/.X11-unix:rw
devices
:
-
/dev/dri
environment
:
-
DISPLAY=unix$DISPLAY
entrypoint
:
-
/bin/bash
stdin_open
:
true
tty
:
true
```
Then run
```
bash
docker-compose
[
-f
mydockercomposefile.yml] run dumux
```
This will start a Docker container running DuMux (hopefully with graphical support).
Docker-compose will default to
`docker-compose.yml`
if no file is specified with the
`-f`
option.
Running without docker-compose
********************************
You also can spin up a Docker container running DuMux by simly using the Docker command. However,
the expression can get quite lengthy, especially when you want to support the graphical display.
Run
```
bash
docker run
-it
--rm
--env
DISPLAY
=
unix
$DISPLAY
--device
/dev/dri
--volume
/tmp/.X11-unix:/tmp/.X11-unix:rw dumux:latest /bin/bash
```
Run first DuMux program
*************************
To run your first DuMux application change the directory by running
```
bash
cd
dumux/build-cmake/test/porousmediumflow/1p/implicit
```
build the program running
```
bash
make test_cc1p
```
and run it
```
bash
./test_cc1p
```
Congratulations you just solved a one-phase model in a quadratic domain with permeability lens.
You can have a look at the result with the visualization tool paraview.
```
bash
paraview 1ptestcc.pvd
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment