-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
56 lines (50 loc) · 1.23 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
FROM python:3.9-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl && \
echo "getting latest install script" && \
curl -fsSL https://code-server.dev/install.sh > install.sh && \
sh install.sh --version 4.5.1 && \
rm install.sh && \
apt-get -qq purge curl && \
apt-get -qq purge && \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update -q && \
apt-get install -yqq \
curl \
git \
htop \
nginx \
make \
tmux \
vim \
&& \
apt-get -qq purge && \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/*
# create user with a home directory
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER=${NB_USER}
ENV HOME=/home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
WORKDIR /work/
WORKDIR ${HOME}
USER ${NB_USER}
ENV PATH="/home/${NB_USER}/.local/bin:${PATH}"
ENV SHELL="/bin/bash"
COPY requirements.txt /tmp
RUN pip install -U pip
RUN pip install --no-cache -r /tmp/requirements.txt
COPY postBuild /tmp
COPY jupyter_notebook_config.py /home/${NB_USER}/.jupyter/
RUN sh /tmp/postBuild
# fix permissions
USER root
RUN chown -R ${NB_USER}:${NB_USER} /home/${NB_USER}/.jupyter/
USER ${NB_USER}
CMD code-server --auth none --bind-addr 0.0.0.0 --port 5000