12/17/2019 - (last updated: 2019-12-19)
add --rm
to automatically delete container when done
pull
images and use appropriate tag
if necessary
Explore graphical options in specific docker images
Web-based
X11
We’ll use 3 Docker images with Web interface:
http
server/usr/share/nginx/html
Local computer web address:
sftp
: 21ssh
: 22http
: 80We’ll use “port mapping” to connect Container ports to Local computer ports in docker run
command:
-P
)-p
)cd $HOME/dockershare cat > mytestfile.html <<- EOF <h1>My Test</h1> <p>This is a simple HTML file.</p> EOF
Results in:
Iris data set page.
Dovex home screen
Iris PCA analysis
rstudio interface
docker run
commands-d
or --detach
: run container in background (prompt back)-P
or --publish-all
: publish all exposed ports to random ports-p
or --publish list
: publish list of ports--name
: assign a name to the containerdocker stop ID
- ID obtained with docker ps
or docker container ls
X11 is also called
“the X Windows system”
We’ll use 3 Docker images with X11 interface:
EMBOSS with interactive graphics: plotorf
and tmap
X11 display needs to be let through the local computer system
xhost
xhost
can add (and delete) host names allowed to make connections to the X server. - From the local terminal:
xhost + localhost
localhost being added to access control list
Verify list:
xhost
access control enabled, only authorized clients can connect INET6:localhost INET:localhost
Note: remeber that 127.0.0.1
is also localhost
Reminder
Terminal
in /Applications/Utilities
bash reminder:
$HOME
is a variable representing your home directory, e.g. /Users/yourname
“Where we are looking” within a Terminal:
Green:Commands from local computer terminal
Ligh plum background: commands from ALTERNATE local computer bash terminal
Commands and output when WITHIN Docker container
Informational - DO NOT RUN! - commands or output examples.
generic output
Slides presentation made with RStudio, ioslides template
Docker logo from www.kissclipart.com
Illustration images from pixabay.com, pexels.com/