Skip to content

Fix up dockerfile in containerization chapter #5

@chendaniely

Description

@chendaniely

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.

Metadata

Metadata

Assignees

No one assigned

    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