mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-10-23 04:51:58 +00:00
Shift "ubuntu" user removal to base build.
This commit is contained in:
@@ -13,14 +13,13 @@ RUN { [ ! "$UBUNTU_MIRROR" ] || sed -i "s|http://\(\w*\.\)*archive\.ubuntu\.com/
|
||||
apt-get -q update && \
|
||||
apt-get -q dist-upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get -q install --no-install-recommends -y ca-certificates git locales python3 sudo tzdata
|
||||
|
||||
apt-get -q install --no-install-recommends -y ca-certificates git locales python3 sudo tzdata && \
|
||||
touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu && \
|
||||
useradd -d /home/zulip -m zulip -u 1000
|
||||
|
||||
FROM base AS build
|
||||
|
||||
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu && \
|
||||
useradd -d /home/zulip -m zulip -u 1000 && \
|
||||
echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
RUN echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
USER zulip
|
||||
WORKDIR /home/zulip
|
||||
|
Reference in New Issue
Block a user