Skip to content

Commit

Permalink
Add Docker
Browse files Browse the repository at this point in the history
- Add Docker repository.
- Install docker-ce package.
- Add docker daemon start to post start script.
  • Loading branch information
prete committed Nov 20, 2019
1 parent fc45708 commit 14d23b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ RUN julia -e 'import Pkg; Pkg.update()' && \

USER root

# Install Docker
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt update
RUN apt install -y docker-ce

# move kernelspec out of home
RUN mv $HOME/.local/share/jupyter/kernels/julia* $CONDA_DIR/share/jupyter/kernels/ && \
chmod -R go+rx $CONDA_DIR/share/jupyter && \
Expand Down
5 changes: 5 additions & 0 deletions poststart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ fi
Rscript -e 'dir.create(path = Sys.getenv("R_LIBS_USER"), showWarnings = FALSE, recursive = TRUE)'
Rscript -e '.libPaths( c( Sys.getenv("R_LIBS_USER"), .libPaths() ) )'

# create matching folders to mount the farm
sudo mkdir -p /nfs
sudo mkdir -p /lustre
sudo mkdir -p /warehouse

# copy mount-farm so its avaiable on the user's path
sudo chmod +x /mount-farm.sh
sudo cp /mount-farm.sh /usr/local/bin/mount-farm

# start docker service
sudo service docker start

export USER=jovyan

0 comments on commit 14d23b7

Please sign in to comment.