-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
58 lines (43 loc) · 2.14 KB
/
Dockerfile
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
48
49
50
51
52
53
54
55
56
57
58
FROM jupyter/datascience-notebook:lab-3.3.4
USER root
# Install a few dependencies for iCommands, text editing, and monitoring instances
RUN apt update && \
apt install -y lsb-release apt-transport-https curl libfreetype6-dev pkg-config libx11-dev gcc less software-properties-common apt-utils glances htop nano
RUN wget -qO - https://packages.irods.org/irods-signing-key.asc | apt-key add - && \
echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) main" >> /etc/apt/sources.list.d/renci-irods.list && \
apt-get update && \
apt install -y irods-icommands
# Install Go
RUN wget -q -c https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
ENV PATH=$PATH:/usr/local/go/bin
# Install CyberDuck CLI
RUN echo "deb https://s3.amazonaws.com/repo.deb.cyberduck.io stable main" > /etc/apt/sources.list.d/cyberduck.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FE7097963FEFBE72 && \
apt update && \
apt install duck
# Install GitHub CLI
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list && \
apt update && \
apt install gh
# Install and configure jupyter lab.
COPY jupyter_notebook_config.json /opt/conda/etc/jupyter/jupyter_notebook_config.json
# Add sudo to jovyan user
RUN apt update && \
apt install -y sudo && \
apt clean && \
rm -rf /var/lib/apt/lists/*
ARG LOCAL_USER=jovyan
ARG PRIV_CMDS='/bin/ch*,/bin/cat,/bin/gunzip,/bin/tar,/bin/mkdir,/bin/ps,/bin/mv,/bin/cp,/usr/bin/apt*,/usr/bin/pip*,/bin/yum'
RUN usermod -aG sudo jovyan && \
echo "$LOCAL_USER ALL=NOPASSWD: $PRIV_CMDS" >> /etc/sudoers
# Rebuild the Jupyter Lab with new tools
RUN jupyter lab build
RUN addgroup jovyan
RUN usermod -aG jovyan jovyan
USER jovyan
WORKDIR /home/jovyan
EXPOSE 8888
COPY entry.sh /bin
RUN mkdir -p /home/jovyan/.irods
ENTRYPOINT ["bash", "/bin/entry.sh"]