Skip to content

Commit d665ed5

Browse files
RichardMcSorleynhooyr
authored andcommitted
Use an init system
1 parent 99da377 commit d665ed5

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

Dockerfile

+8-20
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,15 @@ RUN yarn && NODE_ENV=production yarn task build:server:binary
1818
# We deploy with ubuntu so that devs have a familiar environment.
1919
FROM ubuntu:18.10
2020

21-
# We unfortunately cannot use update-locale because docker will not use the env variables
22-
# configured in /etc/default/locale so we need to set it manually.
23-
ENV LANG=en_US.UTF-8
24-
25-
COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
2621
RUN apt-get update && apt-get install -y \
27-
sudo \
2822
openssl \
23+
net-tools \
24+
git \
2925
locales \
30-
net-tools;
31-
32-
RUN adduser --disabled-password --ingroup sudo --gecos '' coder && \
33-
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
34-
echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \
35-
chmod 0440 /etc/sudoers.d/user;
36-
26+
dumb-init
3727
RUN locale-gen en_US.UTF-8
38-
39-
USER coder
40-
41-
WORKDIR /home/coder
42-
43-
EXPOSE 8443
44-
ENTRYPOINT ["code-server"]
28+
# We unfortunately cannot use update-locale because docker will not use the env variables
29+
# 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"]

0 commit comments

Comments
 (0)