Packaging a finished product (project/app/whatever) for archiving, reproducibility, or production
Potential examples:
When publishing, instead of providing code, data, and describing the environment used, you can include a Dockerfile so anyone can pick up exactly where you left off
You have a project at work that needs to be interacted with every week no matter who looks at it or when
You’re publishing an R package and want to test specific features across different base R or package versions
Words of caution
Docker is limited to the resources you give it. If your dev machine is less than awesome, your Docker container will be much less than awesome
Docker is only allowed access to what you give it and may take some extra work to get running
Some workplaces may not be comfortable with Docker
Some use-cases may require direct access to the hardware and are incompatible with a container system
Sometimes computers do math differently
Containers require proper setup!
Diving In
Docker Run
docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
docker run tells Docker to run the following image
Options are configured as needed
IMAGE is configured as user/image when pulling from docker hub (like CRAN but for Docker)