Dockerfile: Do an apt-get update before the upgrade.

The previous split interacted badly with caching if you reran the
build a few days after a previous build.
This commit is contained in:
Tim Abbott
2018-08-09 17:24:39 -07:00
parent 5daa7ba157
commit 178ac3956a

View File

@@ -24,7 +24,8 @@ ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"
# Next, we upgrade the base image and add a zulip user
RUN apt-get -q dist-upgrade -y && \
RUN apt-get -q update && \
apt-get -q dist-upgrade -y && \
apt-get -q install -y git sudo ca-certificates apt-transport-https python3 && \
useradd -d /home/zulip -m zulip && \
echo 'zulip ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers
@@ -69,7 +70,8 @@ ENV LANG="en_US.UTF-8" \
COPY --from=0 /tmp/zulip-server-docker.tar.gz /root/
COPY custom_zulip_files/ /root/custom_zulip
RUN apt-get -q dist-upgrade -y && \
RUN apt-get -q update && \
apt-get -q dist-upgrade -y && \
apt-get -q install -y sudo ca-certificates apt-transport-https nginx-full && \
# Make sure Nginx is started by Supervisor.
rm /etc/init.d/nginx && \