Skip to content

Instantly share code, notes, and snippets.

@hillar
Last active September 10, 2019 21:58
Show Gist options
  • Save hillar/2b1efdcbe720b14037a424fbc4043822 to your computer and use it in GitHub Desktop.
Save hillar/2b1efdcbe720b14037a424fbc4043822 to your computer and use it in GitHub Desktop.
R in ALPINE docker
FROM alpine:3
MAINTAINER "No Maintenance Intended http://unmaintained.tech/"
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV BUILD_DEPS \
libc-dev \
cairo-dev \
libxmu-dev \
openjdk8-jre-base \
pango-dev \
perl \
tiff-dev \
tk-dev
ENV PERSISTENT_DEPS \
R-mathlib \
libc-dev \
gcc \
gfortran \
icu-dev \
libjpeg-turbo \
libpng-dev \
make \
openblas-dev \
pcre-dev \
readline-dev \
xz-dev \
zlib-dev \
bzip2-dev \
curl-dev
RUN mkdir -p /usr/share/doc/R/html && touch /usr/share/doc/R/html/R.css && mkdir -p /usr/lib/R/library/
RUN apk upgrade --update && \
apk add --no-cache --virtual .build-deps $BUILD_DEPS && \
apk add --no-cache --virtual .persistent-deps $PERSISTENT_DEPS && \
apk add --no-cache R R-dev && \
apk del .build-deps
RUN R -e 'options(repos=structure(c(CRAN="https://ftp.eenet.ee/pub/cran"))); install.packages(c("plumber","pacman")); pacman::p_load_gh("trinker/entity")'
ENV R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
CMD ["R", "--no-save"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment