-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (30 loc) · 927 Bytes
/
Dockerfile
File metadata and controls
35 lines (30 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
############################################################
# Dockerfile to build R Simulator
############################################################
FROM rocker/r-ver:4.1.0
LABEL maintainer='carlos.tighe@insight-centre.org'
# GET UPDATES AND PACKAGES NEEDED
RUN apt-get update -qq && apt-get install -y \
libssl-dev \
libcurl4-gnutls-dev \
libxml2-dev
# install plumber
# RUN R -e "install.packages('plumber')"
# Install R packages
RUN install2.r --error \
readr \
plumber \
dplyr \
stringr\
socialmixr\
devtools\
xml2\
tidyr
# copy app code into docker image
COPY / /
# expose the port on our docker image
# whatever port we expose we need to map the computers port to the docker image port
# we will use port 80 in our docker image because thats generally the port used
EXPOSE 8000
# specify what happens when the container starts
ENTRYPOINT [ "Rscript", "run_api.R" ]