Skip to content

Instantly share code, notes, and snippets.

@jnolis
Last active October 9, 2018 22:56
Show Gist options
  • Save jnolis/8670a7fdcbd10d88a9f132c3c2729e54 to your computer and use it in GitHub Desktop.
Save jnolis/8670a7fdcbd10d88a9f132c3c2729e54 to your computer and use it in GitHub Desktop.
Dockerfile for R Plumber project
# start from the rocker/r-ver:3.5.0 image
FROM rocker/r-ver:3.5.0
# install the linux libraries needed for plumber
RUN apt-get update -qq && apt-get install -y \
libssl-dev \
libcurl4-gnutls-dev
# install plumber
RUN R -e "install.packages('plumber')"
# copy everything from the current directory into the container
COPY / /
# open port 80 to traffic
EXPOSE 80
# when the container starts, start the main.R script
ENTRYPOINT ["Rscript", "main.R"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment