This repository was archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (36 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
47 lines (36 loc) · 1.34 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
45
46
47
FROM ubuntu
RUN apt-get update && apt-get install -y software-properties-common
# Install Ruby 2.4
RUN apt-add-repository ppa:brightbox/ruby-ng && apt-get update
RUN apt-get install -y ruby2.4 ruby2.4-dev build-essential zlib1g-dev liblzma-dev tzdata
RUN gem install bundler rake
# Install iruby
RUN apt-get install -y git libzmq-dev autoconf pkg-config libtool libffi-dev
RUN cd /opt && \
git clone https://github.com/zeromq/czmq && \
cd czmq && \
./autogen.sh && ./configure && make && make install
RUN gem install iruby
# Install jupyter
RUN apt-get install -y python3-pip && pip3 install jupyter
# Install other necessary dependencies
RUN apt-get install -y wget unzip
# Become an unprivileged user
RUN useradd -m -d /home/jupyter -s /bin/bash jupyter
ADD notebooks /home/jupyter/notebooks
RUN chown --recursive jupyter /home/jupyter/notebooks
USER jupyter
WORKDIR /home/jupyter/notebooks
# Configure jupyter
RUN jupyter notebook --generate-config
RUN echo "c.NotebookApp.ip = '*'" >> ~/.jupyter/jupyter_notebook_config.py
# Install Ruby dependencies
RUN bundle install --path=vendor
RUN bundle exec iruby register --force && \
jupyter kernelspec install --user ~/.ipython/kernels/ruby
COPY start.sh /home/jupyter/start.sh
USER root
RUN chown jupyter /home/jupyter/start.sh
RUN chmod u+x /home/jupyter/start.sh
USER jupyter
CMD "/home/jupyter/start.sh"