summaryrefslogtreecommitdiff
path: root/contrib/gate/Dockerfile
blob: 0a4d5741633147450f790036db9ce8a770f41eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM fedora:32

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="/var/tmp/go/src/github.com/containers/podman"

# Only needed for installing build-time dependencies, then will be removed
COPY . $GOSRC

# Install packages from dependencies.txt, ignoring commented lines
# Note: adding conmon and crun so podman command checks will work
RUN dnf -y install \
   $(grep "^[^#]" $GOSRC/contrib/dependencies.txt) diffutils containers-common fuse-overlayfs conmon crun runc --exclude container-selinux; \
   sed -i -e 's|^#mount_program|mount_program|g' -e 's/# size.*/skip_mount_home = "true"/g'  /etc/containers/storage.conf \
   && dnf clean all

# 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

# Install cni config
COPY cni/87-podman-bridge.conflist /etc/cni/net.d/87-podman-bridge.conflist
# Make sure we have some policy for pulling images
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"]