summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2020-12-11 10:10:43 -0800
committerJames E. Blair <jeblair@redhat.com>2020-12-11 11:25:26 -0800
commitf42604a8d9e814f996ffa827cbbafe9b4002b5e0 (patch)
tree999c07608fb6bf92bd40611a3128c76eb5926dd6 /Dockerfile
parentf3e8c809dc8439e555ee162c411b039d85c6b5bf (diff)
downloadzuul-f42604a8d9e814f996ffa827cbbafe9b4002b5e0.tar.gz
Squash some RUN layers in Dockerfile
This will reduce the number of layers in the final image. Change-Id: I1102af5aa98df33d1454964955d0f2c13ee39907
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Dockerfile b/Dockerfile
index f46c09c44..36cbe143f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -39,9 +39,11 @@ RUN assemble
# installations do so we have to call zuul-manage-ansible here. Remove
# /root/.local/share/virtualenv after because it adds wheels into /root
# that we don't need after the install step so are a waste of space.
-RUN /output/install-from-bindep && zuul-manage-ansible && rm -rf /root/.local/share/virtualenv
-
-RUN mkdir /tmp/openshift-install \
+RUN /output/install-from-bindep \
+ && zuul-manage-ansible \
+ && rm -rf /root/.local/share/virtualenv \
+# Install openshift
+ && mkdir /tmp/openshift-install \
&& curl -L $OPENSHIFT_URL -o /tmp/openshift-install/openshift-client.tgz \
&& cd /tmp/openshift-install/ \
&& echo $OPENSHIFT_SHA /tmp/openshift-install/openshift-client.tgz | sha256sum --check \
@@ -52,13 +54,12 @@ ENV DEBIAN_FRONTEND=noninteractive
COPY --from=builder /output/ /output
RUN /output/install-from-bindep zuul_base \
- && rm -rf /output
-RUN useradd -u 10001 -m -d /var/lib/zuul -c "Zuul Daemon" zuul
-
+ && rm -rf /output \
+ && useradd -u 10001 -m -d /var/lib/zuul -c "Zuul Daemon" zuul \
# This enables git protocol v2 which is more efficient at negotiating
# refs. This can be removed after the images are built with git 2.26
# where it becomes the default.
-RUN git config --system protocol.version 2
+ && git config --system protocol.version 2
VOLUME /var/lib/zuul
CMD ["/usr/local/bin/zuul"]
@@ -73,8 +74,7 @@ COPY --from=builder /tmp/openshift-install/oc /usr/local/bin/oc
COPY tools/4D64390375060AA4.asc /etc/apt/trusted.gpg.d/kubic.asc
RUN echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \
&& apt-get update \
- && apt-get install -y \
- skopeo \
+ && apt-get install -y skopeo \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*