summaryrefslogtreecommitdiff
path: root/contrib/gate/Dockerfile
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-05 19:28:10 +0100
committerGitHub <noreply@github.com>2020-03-05 19:28:10 +0100
commit60e9e7ca9c9081f31f6b37c922f0058f82b989ad (patch)
treeeaa56f2370e98e7c91a1d6c26944761d1fdb286a /contrib/gate/Dockerfile
parent36260286402a514417b642abd8f45a800f0dc9da (diff)
parentd0782e7839888d9eecdc97e8e885d5f787f5b8a7 (diff)
downloadpodman-60e9e7ca9c9081f31f6b37c922f0058f82b989ad.tar.gz
podman-60e9e7ca9c9081f31f6b37c922f0058f82b989ad.tar.bz2
podman-60e9e7ca9c9081f31f6b37c922f0058f82b989ad.zip
Merge pull request #5039 from cevich/fix_gobin_exit_bug
Cirrus: Fix gate image & false-positive exits
Diffstat (limited to 'contrib/gate/Dockerfile')
-rw-r--r--contrib/gate/Dockerfile29
1 files changed, 17 insertions, 12 deletions
diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile
index 2a904a202..54bd2cbde 100644
--- a/contrib/gate/Dockerfile
+++ b/contrib/gate/Dockerfile
@@ -33,31 +33,36 @@ RUN dnf -y install \
zip \
&& dnf clean all
-ENV GOPATH="/go" \
- PATH="/go/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" \
+ENV GOPATH="/var/tmp/go" \
+ GOBIN="/var/tmp/go/bin" \
+ PATH="/var/tmp/go/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" \
SRCPATH="/usr/src/libpod" \
- GOSRC="/go/src/github.com/containers/libpod"
+ GOSRC="/var/tmp/go/src/github.com/containers/libpod"
-# Only needed for installing build-time dependencies
+# Only needed for installing build-time dependencies, then will be removed
COPY / $GOSRC
-WORKDIR $GOSRC
-
# Install dependencies
RUN set -x && \
+ mkdir -p "$GOBIN" && \
+ mkdir -p /etc/cni/net.d && \
+ mkdir -p /etc/containers && \
install -D -m 755 $GOSRC/contrib/gate/entrypoint.sh /usr/local/bin/ && \
- python3 -m pip install pre-commit && \
- rm -rf "$GOSRC"
+ python3 -m pip install pre-commit
# Install cni config
-#RUN make install.cni
-RUN mkdir -p /etc/cni/net.d/
COPY cni/87-podman-bridge.conflist /etc/cni/net.d/87-podman-bridge.conflist
-
# Make sure we have some policy for pulling images
-RUN mkdir -p /etc/containers
COPY test/policy.json /etc/containers/policy.json
COPY test/redhat_sigstore.yaml /etc/containers/registries.d/registry.access.redhat.com.yaml
+WORKDIR "$GOSRC"
+RUN make install.tools && \
+ cd / && \
+ rm -rf "$GOSRC" && \
+ mkdir -p "$GOSRC"
VOLUME ["/usr/src/libpod"]
+# This entrypoint will synchronize the above volume ($SRCPATH) to $GOSRC before
+# executing make. This ensures the original source remains prestine and is never
+# modified by any lint/validation checks.
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]