Skip to content

Commit 1f601f2

Browse files
authored
Merge pull request #1399 from SuperSandro2000/docker
Optimize release Docker Image
2 parents c8269fb + 9b07078 commit 1f601f2

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

ci/release-image/Dockerfile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
FROM debian:10
22

3-
RUN apt-get update
4-
RUN apt-get install -y curl
3+
RUN apt-get update \
4+
&& apt-get install -y \
5+
curl \
6+
dumb-init \
7+
htop \
8+
locales \
9+
man \
10+
nano \
11+
git \
12+
procps \
13+
ssh \
14+
sudo \
15+
vim \
16+
&& rm -rf /var/lib/apt/lists/*
517

618
# https://wiki.debian.org/Locale#Manually
7-
RUN apt-get install -y locales
8-
RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen
9-
RUN locale-gen
19+
RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
20+
&& locale-gen
1021
ENV LANG=en_US.UTF-8
1122

1223
RUN chsh -s /bin/bash
1324
ENV SHELL=/bin/bash
1425

15-
RUN apt-get install -y dumb-init sudo
16-
RUN apt-get install -y man procps vim nano htop ssh git
17-
1826
RUN adduser --gecos '' --disabled-password coder && \
1927
echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
2028

@@ -24,8 +32,6 @@ RUN curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.4/fixuid-0.
2432
mkdir -p /etc/fixuid && \
2533
printf "user: coder\ngroup: coder\n" > /etc/fixuid/config.yml
2634

27-
RUN rm -rf /var/lib/apt/lists/*
28-
2935
COPY release/code-server*.tar.gz /tmp/
3036
RUN cd /tmp && tar -xzf code-server*.tar.gz && rm code-server*.tar.gz && \
3137
mv code-server* /usr/local/lib/code-server && \

0 commit comments

Comments
 (0)