Last active
October 9, 2018 22:56
-
-
Save jnolis/8670a7fdcbd10d88a9f132c3c2729e54 to your computer and use it in GitHub Desktop.
Dockerfile for R Plumber project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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