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)
docker run --rm -d \
  -p 8000:8000 \
  --name palmer-plumber \
  alexkgold/plumber

Docker Compose

docker-compose.yml -> docker compose [-f <arg>...] [options] [COMMAND] [ARGS...]

  • The docker-compose file provides a structured way to describe a docker image
  • Easy way to combine multiple services (maybe you want R + Python)
  • Can be used with the run (do something) or up command (be ready to do something)
  • Options are similar to docker run
version: '3.3'
services:
    plumber:
        ports:
            - '8000:8000'
        container_name: palmer-plumber
        image: alexkgold/plumber
cd project-dir
docker-compose up