Skip to content

Commit 76afe5f

Browse files
committed
Shift "ubuntu" user removal to base build.
1 parent e6b6018 commit 76afe5f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ RUN { [ ! "$UBUNTU_MIRROR" ] || sed -i "s|http://\(\w*\.\)*archive\.ubuntu\.com/
1313
apt-get -q update && \
1414
apt-get -q dist-upgrade -y && \
1515
DEBIAN_FRONTEND=noninteractive \
16-
apt-get -q install --no-install-recommends -y ca-certificates git locales python3 sudo tzdata
17-
16+
apt-get -q install --no-install-recommends -y ca-certificates git locales python3 sudo tzdata && \
17+
touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu && \
18+
useradd -d /home/zulip -m zulip -u 1000
1819

1920
FROM base AS build
2021

21-
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu && \
22-
useradd -d /home/zulip -m zulip -u 1000 && \
23-
echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
22+
RUN echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
2423

2524
USER zulip
2625
WORKDIR /home/zulip

0 commit comments

Comments
 (0)