-
Notifications
You must be signed in to change notification settings - Fork 28
/
Dockerfile_devel
66 lines (50 loc) · 1.78 KB
/
Dockerfile_devel
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
59
60
61
62
63
64
65
66
FROM hbclab/nibetaseries:unstable
USER root
ARG DEBIAN_FRONTEND="noninteractive"
# net-tools needed for code-server
RUN apt-get update &&\
apt-get install -y \
net-tools \
git \
nano
ENV SHELL=/bin/bash
# necessary to find nibetaseries in /src/nibetaseries
ENV PYTHONNOUSERSITE=0
USER neuro
RUN /bin/bash -c "cd /src/nibetaseries &&\
conda init bash &&\
source /home/neuro/.bashrc &&\
source activate neuro_py36 &&\
pip install --no-use-pep517 -e .[test,dev,doc,nb]"
USER root
RUN cp -R /src/nibetaseries/src/nibetaseries.egg-info /src/
# set up code-server (need net-tools for initialization)
RUN curl -o /tmp/code-server.tar.gz -SL https://github.com/cdr/code-server/releases/download/2.1523-vsc1.38.1/code-server2.1523-vsc1.38.1-linux-x86_64.tar.gz
RUN mkdir /src/codeserver &&\
tar -xvf /tmp/code-server.tar.gz -C /src/codeserver --strip-components=1
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - &&\
apt-get install -y nodejs &&\
npm i \
USER neuro
RUN /src/codeserver/code-server --install-extension eamodio.gitlens &&\
/src/codeserver/code-server --install-extension ms-python.python &&\
/src/codeserver/code-server --install-extension lextudio.restructuredtext
ENTRYPOINT ["/src/codeserver/code-server", "/src/nibetaseries"]
# usage example (assuming in local nibetaseries directory):
#
# docker run -it \
# -p 127.0.0.1:8445:8080 \
# -v ${PWD}:/src/nibetaseries \
# nibetaseries_devel:latest
#
# then type 127.0.0.1:8445 in your browser address bar