-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.32 KB
/
Dockerfile
File metadata and controls
44 lines (35 loc) · 1.32 KB
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
36
37
38
39
40
41
42
43
44
# Use the rocker/rstudio or rocker/verse as the base image
FROM rocker/rstudio:latest
# Update apt, run unminimize with automated 'yes' response, install man-db, and clean up after
# RUN apt update && \
# yes | unminimize && \
# apt install -y man-db && \
# rm -rf /var/lib/apt/lists/*
RUN apt update \
&& apt install vim-tiny libmagick++-dev libudunits2-dev cargo libavfilter-dev libgdal-dev -y \
&& rm -rf /var/lib/apt/lists/*
# Expose the necessary port for RStudio
EXPOSE 8787
# Set up environment variables for RStudio (optional)
ENV PASSWORD=yourpassword
# Set the working directory inside the container
WORKDIR /home/rstudio/work
# Install system dependencies for R packages and utilities
RUN apt-get update -y && \
apt-get install -y \
curl \
libxml2-dev \
libssl-dev \
libcurl4-openssl-dev \
build-essential && \
apt-get clean
# Install R packages from CRAN
RUN R -e "install.packages(c('readr', 'ggplot2', 'dplyr', 'klaR', 'Rtsne' , 'umap', 'fastDummies'))"
# Copy project files into the container
# COPY src/ /home/rstudio/work/src/
# COPY data/ /home/rstudio/work/data/
# COPY report.Rmd /home/rstudio/work/
# Set permissions for the working directory
# RUN chown -R rstudio:rstudio /home/rstudio/work
# Clean up unnecessary files
# RUN rm -rf /var/lib/apt/lists/* /tmp/*