Skip to content

Instantly share code, notes, and snippets.

@BerriJ
Created August 18, 2021 10:30
Show Gist options
  • Save BerriJ/3a793e167886d915aae4b93a1ba2eb54 to your computer and use it in GitHub Desktop.
Save BerriJ/3a793e167886d915aae4b93a1ba2eb54 to your computer and use it in GitHub Desktop.
Dockerfile vscDebugger Problem
FROM ubuntu:focal
SHELL ["/bin/bash", "-c"]
ENV R_VERSION=4.1.1 \
# See https://packagemanager.rstudio.com/client/#/repos/1/overview
R_REPOS=https://packagemanager.rstudio.com/all/__linux__/focal/4526215 \
DISPLAY=:0 \
TZ=Europe/Berlin
ARG DEBIAN_FRONTEND=noninteractive
# Ubuntu Setup
RUN apt-get update &&\
apt-get -y --no-install-recommends install \
software-properties-common \
git \
build-essential \
tar \
curl \
dirmngr \
gnupg-agent \
fontconfig \
pandoc \
perl \
python3-pip \
wget \
libcurl4-openssl-dev \
openssl \
libssl-dev \
libmagick++-dev \
libpoppler-cpp-dev \
netbase \
libxml2-dev \
gdb \
libgsl-dev \
libudunits2-dev \
libgdal-dev \
libharfbuzz-dev \
libfribidi-dev \
vim \
cargo \
locales &&\
locale-gen en_US.UTF-8
# Install R
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
E298A3A825C0D65DFD57CBB651716619E084DAB9 \
&& add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' \
&& apt-get -y install --no-install-recommends r-base=${R_VERSION}* r-base-core=${R_VERSION}* \
r-recommended=${R_VERSION}* r-base-dev=${R_VERSION}*
# This does not work:
RUN Rscript -e "install.packages('devtools', repos= '$R_REPOS')"
RUN Rscript -e "remotes::install_github('ManuelHentschel/vscDebugger@v0.4.7', repos= '$R_REPOS')"
# This works:
# RUN Rscript -e "remotes::install_github('ManuelHentschel/vscDebugger@v0.4.5', repos= '$R_REPOS')"
# Set the default shell to zsh rather than bash
ENTRYPOINT [ "/bin/zsh" ]
@BerriJ
Copy link
Author

BerriJ commented Aug 22, 2021

Thank you! In particular for the dependabot hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment