-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
107 lines (93 loc) · 3.41 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Your version: 0.6.0 Latest version: 0.7.0
# Generated by Neurodocker version 0.6.0
# Timestamp: 2020-04-30 13:55:19 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
#
# https://github.com/kaczmarj/neurodocker
FROM hbclab/accel-bids:unstable
USER root
ARG DEBIAN_FRONTEND="noninteractive"
ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
&& apt-get update -qq \
&& apt-get install -y -q --no-install-recommends \
apt-utils \
bzip2 \
ca-certificates \
curl \
locales \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG="en_US.UTF-8" \
&& chmod 777 /opt && chmod a+s /opt \
&& mkdir -p /neurodocker \
&& if [ ! -f "$ND_ENTRYPOINT" ]; then \
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
&& echo 'set -e' >> "$ND_ENTRYPOINT" \
&& echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
&& echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
fi \
&& chmod -R 777 /neurodocker && chmod a+s /neurodocker
ENTRYPOINT ["/neurodocker/startup.sh"]
RUN test "$(getent passwd coder)" || useradd --no-user-group --create-home --shell /bin/bash coder
USER coder
WORKDIR /home/coder
ENV SHELL="/bin/bash"
RUN curl -o /tmp/code-server.tar.gz -SL https://github.com/cdr/code-server/releases/download/3.0.2/code-server-3.0.2-linux-x86_64.tar.gz
RUN mkdir -p /opt/codeserver && tar -xvf /tmp/code-server.tar.gz -C /opt/codeserver --strip-components=1
RUN /opt/codeserver/code-server --install-extension eamodio.gitlens && /opt/codeserver/code-server --install-extension ms-python.python
EXPOSE 8080
ENTRYPOINT ["/opt/codeserver/code-server", "--auth", "none", "--host", "0.0.0.0", "/home/coder/projects"]
RUN echo '{ \
\n "pkg_manager": "apt", \
\n "instructions": [ \
\n [ \
\n "base", \
\n "hbclab/accel-bids:unstable" \
\n ], \
\n [ \
\n "user", \
\n "coder" \
\n ], \
\n [ \
\n "workdir", \
\n "/home/coder" \
\n ], \
\n [ \
\n "env", \
\n { \
\n "SHELL": "/bin/bash" \
\n } \
\n ], \
\n [ \
\n "run", \
\n "curl -o /tmp/code-server.tar.gz -SL https://github.com/cdr/code-server/releases/download/3.0.2/code-server-3.0.2-linux-x86_64.tar.gz" \
\n ], \
\n [ \
\n "run", \
\n "mkdir -p /opt/codeserver && tar -xvf /tmp/code-server.tar.gz -C /opt/codeserver --strip-components=1" \
\n ], \
\n [ \
\n "run", \
\n "/opt/codeserver/code-server --install-extension eamodio.gitlens && /opt/codeserver/code-server --install-extension ms-python.python" \
\n ], \
\n [ \
\n "expose", \
\n [ \
\n "8080" \
\n ] \
\n ], \
\n [ \
\n "entrypoint", \
\n "/opt/codeserver/code-server --auth none --host 0.0.0.0 /home/coder/projects" \
\n ] \
\n ] \
\n}' > /neurodocker/neurodocker_specs.json