whaler is a package for interfacing with Docker from R.
And the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("uncoast-unconf/whaler")
There are a few basic commands that are analagous to their Docker CLI counterparts:
library(whaler)
# Generate Empty Dockerfile
dockerfile()
# Generate empty Dockerfile and populate
mydockerfile <- dockerfile() %>%
set_from("debian:stretch") %>%
set_run() %>%
set_label() %>%
set_env() %>%
set_expost()
# Write Dockerfile
write_dockerfile(mydocker)
In the dockerfile generation, we sill need set_* functions for:
- CMD
- ADD
- COPY
- ENTRYPOINT
- VOLUME
- USER
- WORKDIR
- ARG
- ONBUILD
- STOPSIGNAL
- HEALTHCHECK
- SHELL
And we have set_* functions for:
- ENV
- EXPOST
- FROM
- LABEL
- RUN