Open benmarwick opened 4 years ago
When starting with a description
object or file, copy
simply was not implemented yet because it started out as an option for file-based image generation. What you can do after the commit above is the following:
df_description <- dockerfile(from = here::here("DESCRIPTION"),
image = paste0('rocker/verse:',
paste0(R.version$major,".",R.version$minor)),
container_workdir = 'compendium/',
filter_baseimage_pkgs = TRUE,
copy = "." ) # copy all files in the current working directory
> print(df_description)
FROM rocker/verse:3.6.2
LABEL maintainer="daniel"
# CRAN packages skipped because they are in the base image:
RUN ["install2.r", "compendium", "here"]
WORKDIR compendium/
COPY ["./", "./"]
CMD ["R"]
You need development version 0.6.0.9002
for that, currently only in my fork.
The
copy
argument incontainerit::dockerfile()
does not seem to work as expected. I never get any files in my container. How can I get all the files in my compendium into the container usingcontainerit::dockerfile()
?https://github.com/benmarwick/testcontainerit/blob/master/devhistory.R#L29
Currently I'm doing this to COPY files into the container, how can I do this with
containerit::dockerfile()
? Can we get the COPY argument fully exposed in the R function?