Created
April 29, 2020 17:09
-
-
Save davidtedfordholt/679cd1e8b8f664104d028d181a8e4670 to your computer and use it in GitHub Desktop.
Dockerfile for davidtedfordholt/plumber-verse
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
## Plumber-verse Base Image ##################### | |
FROM rocker/verse | |
RUN apt-get update -qq && apt-get install -y \ | |
git-core \ | |
libssl-dev \ | |
libcurl4-gnutls-dev | |
## Install Plumber | |
## dev version | |
# RUN apt-get install -y libsodium-dev | |
# RUN R -e 'install.packages(c("remotes"))' | |
# RUN R -e 'remotes::install_github("rstudio/plumber")' | |
# CRAN version | |
RUN install2.r plumber | |
## Install future (for multithreading) | |
RUN install2.r future | |
## Define port used by plumber | |
EXPOSE 8000 | |
ENTRYPOINT ["R", "-e", "pr <- plumber::plumb(commandArgs()[4]); pr$run(host='0.0.0.0', port=8000)"] | |
## Define runtime file | |
CMD ["plumber.R"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment