User Tools

Site Tools


software:pylith:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:pylith:docker [2016/10/19 20:04]
baagaard [Run Unix shell within Docker to use PyLith.]
software:pylith:docker [2017/03/29 19:52] (current)
baagaard [Running PyLith in a portable, Linux environment via Docker]
Line 1: Line 1:
-====== What is Docker? ======+====== Running PyLith in a portable, Linux environment via Docker ====== 
 + 
 +**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. 
 + 
 +===== What is Docker? ===== 
  
 From https://​www.docker.com/​what-docker:​ From https://​www.docker.com/​what-docker:​
Line 9: Line 14:
 > 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."​ > 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."​
  
-====== Setup (first time only) ======+===== Setup (first time only) =====
  
-===== Install Docker ​=====+==== Install Docker ====
  
 https://​www.docker.com/​products/​docker https://​www.docker.com/​products/​docker
  
-===== Create container to store persistent user data =====+==== Create container to store persistent user data ====
  
 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). 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).
Line 24: Line 29:
  
  
-====== Run Unix shell within Docker to use PyLith. ​======+===== Run Unix shell within Docker to use PyLith. =====
  
 <​code>​ <​code>​
-$ docker run -ti --volumes-from ​geodynamics/​pylith-data geodynamics/​pylith+$ docker run -ti --volumes-from pylith-data geodynamics/​pylith
 </​code>​ </​code>​
  
Line 41: Line 46:
     - Attach to container ''​$ docker attach CONTAINER_ID''​     - Attach to container ''​$ docker attach CONTAINER_ID''​
  
-====== Copy data to/from persistent storage volume. ​======+==== Troubleshooting ==== 
 + 
 +<​code>​ 
 +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: ". 
 +</​code>​ 
 + 
 +  * Restart docker. ​ ''​$ sudo service docker restart''​ 
 +  * Run docker image. ''​$ docker run -ti --volumes-from pylith-data geodynamics/​pylith''​ 
 + 
 +===== Copy data to/from persistent storage volume. =====
  
 These commands are run on the local host outside the container, not inside the Docker container. These commands are run on the local host outside the container, not inside the Docker container.
Line 54: Line 68:
 </​code>​ </​code>​
  
-====== Docker Quick Reference ​======+===== Docker Quick Reference =====
  
   * List local docker images ''​$ docker images''​   * List local docker images ''​$ docker images''​
software/pylith/docker.1476907472.txt.gz · Last modified: 2016/10/19 20:04 by baagaard