Skip to content

Custom COPY additions not exported #171

Open
@MarkEdmondson1234

Description

@MarkEdmondson1234

Hello :)

I was trying to replicate the exact Dockerfile from a folder, but had to override the COPY line as there was no option to add a custom one like Cmd() - I had to use the below:

 docker <- suppressWarnings(dockerfile(deploy_folder,
     image = "trestletech/plumber",
     offline = FALSE,
     cmd = Cmd("api.R"),
     maintainer = NULL,
     container_workdir = NULL,
     entrypoint = Entrypoint("R",
                   params = list("-e",
                                 "pr <- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=as.numeric(Sys.getenv('PORT')))")),
     filter_baseimage_pkgs = TRUE,
     ...))

  addInstruction(docker) <-containerit:::Copy(".","./")

print(docker)
#FROM trestletech/plumber
#COPY ["./", "./"]
#ENTRYPOINT ["R", "-e", "pr <- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=as.numeric(Sys.getenv('PORT')))"]
#CMD ["api.R"]

Could there be a Copy() function exported to achieve similar to above?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions