October 22, 2019
Container Image: A self-contained, read-only file(s) used to run application(s)
Container: A running instance of an image
Linux Namespaces for hiding various aspects of host system from container.
Linux cgroups to limit RAM, CPU cores, etc.
When user is untrusted: run container as user
|Fast Startup||Another layer of abstraction|
|Shareable||Additional development complexity|
|Reproducible||Licensed software can be tricky|
GPU-enabled IPython w/TensorFlow on a GPU node:
Saved container for
builda container image
-rto show runscript
Set before running to add to container:
To change where image files are cached:
Add host directory to the container with
To specify DockerHub credentials:
Quick way to determine which files are from image:
Bind GPU drivers properly when CUDA installed inside container:
mpiruninside container needs more setup
I want to run RStudio and Tidyverse.
Then connect to http://localhost:8787
When you have to configure your own
CMDfor default runtime behavior
ldconfigat the end of your
A half-fix for my RStudio issue
Specify a default action.
REPOSITORY TAG IMAGE ID CREATED SIZE rocker/rstudio latest 879f3fd2bee9 39 hours ago 1.12GB ubuntu bionic 93fd78260bd1 13 days ago 86.2MB
--rmto clean up container after it exits
--volumeto bind directories to container
-eto set environment variables
-e USERID=$UIDcan avoid permission woes
Clean up every now and again.
WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all dangling images - all dangling build cache Are you sure you want to continue? [y/N]