forked from sigstore/rekor
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.rekor-cli.rh
51 lines (41 loc) · 2.45 KB
/
Dockerfile.rekor-cli.rh
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
42
43
44
45
46
47
48
49
#Build stage
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.21@sha256:98a0ff138c536eee98704d6909699ad5d0725a20573e2c510a60ef462b45cce0 AS build-env
USER root
RUN mkdir /opt/app-root && mkdir /opt/app-root/src && git config --global --add safe.directory /opt/app-root/src
WORKDIR /opt/app-root/src
COPY . .
WORKDIR /opt/app-root/src/hack/tools
RUN go mod vendor
WORKDIR /opt/app-root/src
RUN git update-index --assume-unchanged Dockerfile.rekor-cli.rh && \
export GIT_VERSION=$(git describe --tags --always --dirty) && \
export GIT_HASH=$(git rev-parse HEAD) && \
export BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
go mod vendor && \
make Makefile.swagger && \
make -f Build.mak cross-platform && \
gzip rekor_cli_darwin_amd64 && \
gzip rekor_cli_linux_amd64 && \
gzip rekor_cli_windows_amd64.exe && \
gzip rekor_cli_darwin_arm64 && \
gzip rekor_cli_linux_arm64 && \
gzip rekor_cli_linux_ppc64le && \
gzip rekor_cli_linux_s390x && \
git update-index --no-assume-unchanged Dockerfile.rekor-cli.rh
#Install stage
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:f5d2c6a1e0c86e4234ea601552dbabb4ced0e013a1efcbfb439f1f6a7a9275b0
LABEL description="Rekor-cli is a command line interface (CLI) tool used to interact with a rekor server."
LABEL io.k8s.description="Rekor-cli is a command line interface (CLI) tool used to interact with a rekor server."
LABEL io.k8s.display-name="Rekor-cli container image for Red Hat Trusted Signer"
LABEL io.openshift.tags="rekor-cli trusted-signer"
LABEL summary="Provides the rekor CLI binary for interacting with a rekor server"
LABEL com.redhat.component="rekor-cli"
LABEL name="rekor-cli"
COPY --from=build-env /opt/app-root/src/rekor_cli_darwin_amd64.gz /usr/local/bin/rekor_cli_darwin_amd64.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_linux_amd64.gz /usr/local/bin/rekor_cli_linux_amd64.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_darwin_arm64.gz /usr/local/bin/rekor_cli_darwin_arm64.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_linux_arm64.gz /usr/local/bin/rekor_cli_linux_arm64.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_linux_ppc64le.gz /usr/local/bin/rekor_cli_linux_ppc64le.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_linux_s390x.gz /usr/local/bin/rekor_cli_linux_s390x.gz
COPY --from=build-env /opt/app-root/src/rekor_cli_windows_amd64.exe.gz /usr/local/bin/rekor_cli_windows_amd64.exe.gz
WORKDIR /opt/app-root/src/home