See the PyLith User Manual (v2.2.0) for the latest instructions. The instructions here do not include how to use applications with graphical-user interfaces within the container.
“Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.
Containers running on a single machine share the same operating system kernel; they start instantly and use less RAM. Images are constructed from layered filesystems and share common files, making disk usage and image downloads much more efficient.”
This container, called pylith-data, will hold a directory where all your user data can be stored for use with PyLith within Docker. The data can persist for different versions of PyLith; that is, you can update to a newer version of PyLith and your user data will still be available. This directory is not directly accessible from your host computer. However, you can copy files to/from your host filesystem using “docker cp” (see below).
$ docker create --name pylith-data geodynamics/pylith-data
$ docker run -ti --volumes-from pylith-data geodynamics/pylith
HINT: Within the container, you will probably want to copy the examples from the pylith-VERSION directory to the data directory, which is the persistent storage.
$ cp -R ~/pylith-VERSION/examples ~/data
$ docker ps
$ docker attach CONTAINER_ID
docker: Error response from daemon: oci runtime error: process_linux.go:330: running prestart hook 0 caused "fork/exec /usr/bin/dockerd (deleted): no such file or directory: ".
$ sudo service docker restart
$ docker run -ti –volumes-from pylith-data geodynamics/pylith
These commands are run on the local host outside the container, not inside the Docker container.
$ docker cp pylith-data:/data/pylith-user/PATH/FILENAME LOCAL_PATH
$ docker cp LOCAL_PATH pylith-data:/data/pylith-user/PATH/
$ docker images
$ docker ps -a
$ docker ps
$ docker rm CONTAINER_ID
$ docker rmi IMAGE_ID