Docker Quick Guide:
Docker is a tool that is designed to benefit both developers and system administrators, making it a part of many DevOps (developers + operations) toolchains. 
For developers, it means that they can focus on writing code without worrying about the system that it will ultimately be running on. 
It also allows them to get a head start by using one of thousands of programs already designed to run in a Docker container as a part of their application.
Clean up cached containers and images and have a fresh/clean staring:
 
 
  [xinzhang@localhost ~]$ docker container rm $(docker container ls -aq)
[xinzhang@localhost ~]$ docker image rm $(docker image ls -aq)
  
 Pull Docker image
 
 
  [xinzhang@localhost ~]$ docker pull jcsda/docker
gnu7: Pulling from jcsda/docker
ae79f2514705: Pull complete 
5ad56d5fc149: Pull complete 
170e558760e8: Pull complete 
395460e233f5: Pull complete 
6f01dc62e444: Pull complete 
7f3d40fa237a: Pull complete 
dff43d8c6643: Pull complete 
4e12a99bcc92: Pull complete 
d33ce75f93e3: Pull complete 
90a4222034c8: Pull complete 
61ee343ab8d0: Pull complete 
d95f25876249: Pull complete 
126714e2065d: Pull complete 
7608686a43cf: Pull complete 
Digest: sha256:8c18393ee609bab76a620b82256bed49e01efcb267d43acc93629ee3a5c585b3
Status: Downloaded newer image for jcsda/docker:latest
[xinzhang@localhost ~]$ docker image ls -a
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
jcsda/docker         latest             0d4c67b80b8c        3 days ago          2.03GB
  
 Run Docker container
 
 
  [xinzhang@localhost ~]$ docker container run -it --rm -v $(pwd)/jedi:/jedi 0d4
root@27a7dcc68c0c:/usr/local# root@27a7dcc68c0c:/usr/local# which mpif90
/usr/local/bin/mpif90
root@27a7dcc68c0c:/usr/local# mpif90 --version
GNU Fortran (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@27a7dcc68c0c:/usr/local# env
EIGEN3_INCLUDE_DIR=/usr/local
HOSTNAME=27a7dcc68c0c
TERM=xterm
LD_LIBRARY_PATH=/usr/local/lib
PATH=.:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/usr/local
PNETCDF=/usr/local
LAPACK_LIBRARIES=/usr/local/lib/liblapack.a;/usr/local/lib/libblas.a
LAPACK_PATH=/usr/local
LAPACK_DIR=/usr/local
SHLVL=1
HOME=/root
NETCDF=/usr/local
BOOST_ROOT=/usr/local
PIO=/usr/local
root@27a7dcc68c0c:/jedi# ls -la
total 987052
drwxrwxr-x. 19 1000 1001      4096 Nov  4 22:16 .
drwxr-xr-x.  1 root root        58 Nov  6 02:44 ..
drwxrwxr-x.  7 1000 1001       119 Nov  2 14:36 .git
drwxrwxr-x.  5 1000 1001        41 Nov  1 18:02 build
drwxrwxr-x. 16 1000 1001       220 Nov  2 15:39 code
drwxrwxr-x.  4 1000 1001        36 Oct  3 19:34 data
drwxrwxr-x.  5 1000 1001       157 Nov  4 22:30 docker
drwxrwxr-x.  9 1000 1001      4096 Aug  2 22:36 docker-elastic-agents
drwxrwxr-x.  3 1000 1001        75 Nov  2 21:23 docker_base
drwxrwxr-x. 11 1000 1001      4096 Oct 26 20:05 ecbuild
drwxrwxr-x. 10 1000 1001      4096 Oct 26 20:24 eckit
drwxrwxr-x.  9 1000 1001       215 Oct 26 20:56 fckit
drwxrwxr-x.  5 1000 1001        64 Oct 14 21:50 geovalue
drwxrwxr-x.  5 1000 1001      4096 Nov  4 20:52 ncview
drwxrwxr-x.  2 1000 1001        38 Oct 26 22:45 new
drwxrwxr-x.  4 1000 1001        49 Oct 23 04:30 singularity
drwxrwxr-x.  4 1000 1001        90 Nov  3 21:58 test
drwxrwxr-x.  3 1000 1001        50 Nov  2 21:26 tkdiff
drwxrwxr-x.  3 1000 1001        24 Nov  1 02:13 tmp