Skip to content

Commit

Permalink
Added docker container for RStudio server w/easyXpress
Browse files Browse the repository at this point in the history
  • Loading branch information
msauria committed Dec 5, 2024
1 parent 6a7545a commit d6d1d2f
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build dockerfile on change
name: Build Docker (env/Dockerfile)

on:
push:
paths:
- 'env/Dockerfile'
- '.github/workflows/build_docker.yml'
pull_request:
paths:
- 'env/aDockerfile'
- '.github/workflows/build_docker.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

# Build Tools
- name: Build and Publish
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: andersenlab/easyxpress
tag: "${{ steps.current-time.formattedTime }}"
username: ${{ secrets.KSE_DOCKER_USER }}
password: ${{ secrets.KSE_DOCKER_PASS }}
snapshot: true
dockerfile: Dockerfile
workdir: "env"
tags: "latest"
cache: true
1 change: 1 addition & 0 deletions env/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.libPaths("/packages/")
31 changes: 31 additions & 0 deletions env/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM rocker/rstudio:4.2.2

LABEL source="https://github.com/davetang/learning_docker/blob/main/rstudio/Dockerfile"

RUN apt-get clean all && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
libhdf5-dev \
libcurl4-gnutls-dev \
libssl-dev \
libxml2-dev \
libpng-dev \
libxt-dev \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libglpk40 \
libgit2-dev \
&& apt-get clean all && \
apt-get purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN Rscript -e "install.packages(c('rmarkdown', 'tidyverse', 'workflowr', 'devtools', 'lme4', 'ggpubr', 'multcompView', 'igraph'));"
RUN Rscript -e "devtools::install_github('AndersenLab/easyXpress')"

# the rstudio/ path is set for building with GitHub Actions
COPY --chown=rstudio:rstudio rstudio-prefs.json /home/rstudio/.config/rstudio
COPY --chown=rstudio:rstudio .Rprofile /home/rstudio/

WORKDIR /home/rstudio
40 changes: 40 additions & 0 deletions env/rstudio-prefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"save_workspace": "never",
"always_save_history": false,
"reuse_sessions_for_project_links": true,
"posix_terminal_shell": "bash",
"initial_working_directory": "~",
"panes": {
"quadrants": [
"Source",
"TabSet1",
"Console",
"TabSet2"
],
"tabSet1": [
"Environment",
"History",
"Connections",
"Build",
"VCS",
"Tutorial",
"Presentation"
],
"tabSet2": [
"Files",
"Plots",
"Packages",
"Help",
"Viewer",
"Presentations"
],
"hiddenTabSet": [],
"console_left_on_top": false,
"console_right_on_top": true,
"additional_source_columns": 0
},
"editor_theme": "Clouds Midnight",
"load_workspace": false,
"insert_native_pipe_operator": true,
"editor_keybindings": "vim"
}

0 comments on commit d6d1d2f

Please sign in to comment.