Closed logstar closed 3 years ago
So to answer each one:
WORKDIR /home/OpenPedCan-api
to the Dockerfile on Line 2. I haven't tested that, but it should work, and the WORKDIR command will create the directory, so no need for the mkdir command first.As far as building in Jenkins, we build the container and tag it, then push it to ECR and give that tag to the ECS task definition at runtime. Adding a workdir shouldn't affect deployment as long as the container still builds and runs locally.
So to answer each one:
- You can add just
WORKDIR /home/OpenPedCan-api
to the Dockerfile on Line 2. I haven't tested that, but it should work, and the WORKDIR command will create the directory, so no need for the mkdir command first.- It should run under the workdir, but I'd advise building it locally first.
As far as building in Jenkins, we build the container and tag it, then push it to ECR and give that tag to the ECS task definition at runtime. Adding a workdir shouldn't affect deployment as long as the container still builds and runs locally.
@blackdenc Thank you for the quick reply!
Hi @blackdenc - I was wondering how
OpenPedCan-api
is deployed with Jenkins. This general question is related to following two specific questions.Can I add the following lines in Dockerfile to set a new working directory in the docker image, in order to prevent any overwriting of the files in
/
? Will it affect Jenkins deployment?Will
Rscript main.R
always be called under the endingWORKDIR
of the Dockerfile? I am planning to assume the working directory is the ending DockerfileWORKDIR
, in order to split R files into multiple individual ones and load them inplumber.R
.cc @jharenza @jonkiky @komalsrathi @taylordm @chinwallaa