File tree 1 file changed +17
-4
lines changed
1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,30 @@ COPY . .
16
16
RUN yarn && NODE_ENV=production yarn task build:server:binary
17
17
18
18
# We deploy with ubuntu so that devs have a familiar environment.
19
- FROM ubuntu:18.10
19
+ FROM ubuntu:18.04
20
20
21
21
RUN apt-get update && apt-get install -y \
22
22
openssl \
23
23
net-tools \
24
24
git \
25
25
locales \
26
+ sudo \
26
27
dumb-init
28
+
27
29
RUN locale-gen en_US.UTF-8
28
30
# We unfortunately cannot use update-locale because docker will not use the env variables
29
31
# configured in /etc/default/locale so we need to set it manually.
30
- ENV LANG=en_US.UTF-8
31
- ENV LC_ALL=en_US.UTF-8
32
- ENTRYPOINT ["/usr/bin/dumb-init" , "code-server" ]
32
+ ENV LC_ALL=en_US.UTF-8
33
+
34
+ RUN adduser --gecos '' --disabled-password coder
35
+ RUN echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
36
+
37
+ USER coder
38
+ # We create first instead of just using WORKDIR as when WORKDIR creates, the user is root.
39
+ RUN mkdir -p /home/coder/project
40
+ WORKDIR /home/coder/project
41
+
42
+ COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
43
+ EXPOSE 8443
44
+
45
+ ENTRYPOINT ["dumb-init" , "code-server" ]
You can’t perform that action at this time.
0 commit comments