Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up dockerfile in containerization chapter #5

Open
chendaniely opened this issue Feb 8, 2023 · 0 comments
Open

Fix up dockerfile in containerization chapter #5

chendaniely opened this issue Feb 8, 2023 · 0 comments

Comments

@chendaniely
Copy link
Contributor

current Dockerfile example I showed in class was this:

FROM rocker/rstudio

WORKDIR /home/rstudio

# you can use remotes::install_version() as well instead of using renv

COPY --chown=rstudio:rstudio renv.lock .
COPY --chown=rstudio:rstudio renv renv
COPY --chown=rstudio:rstudio .Rprofile .

RUN ls -alh

USER rstudio
RUN Rscript -e "renv::repair()"
USER root

The USER swapping seems really hacky, as well as the chown bits.
It does mean we have to talk + review more of whoami and ls -alh commands, but there might be a simpler way to fully setup the container instead of this way.

I think the previous class was using conda mainly so this wasn't a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant