Skip to content

Commit

Permalink
modify labels in Dockerfile's (#76)
Browse files Browse the repository at this point in the history
This pr changes the labels in the Docker files so they apply correctly
(rekor-cli) is ok
  • Loading branch information
JasonPowr authored Sep 27, 2023
1 parent 5b02421 commit a438efa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
5 changes: 2 additions & 3 deletions redhat/overlays/Dockerfile.backfill-redis
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ RUN make backfill-redis

#Install stage
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f
COPY --from=build-env /opt/app-root/src/backfill-redis /usr/local/bin/backfill-redis
WORKDIR /opt/app-root/src/home

LABEL description="Backfillredis is a job that will go through the TLog and make sure that missing entries are added to the search index."
LABEL io.k8s.description="Backfillredis is a job that will go through the TLog and make sure that missing entries are added to the search index."
LABEL io.k8s.display-name="Backfillredis container image for Red Hat Trusted Signer"
LABEL io.openshift.tags="backfill-redis trusted-signer"
LABEL summary="Provides the backfill-redis binary for a rekor server"

COPY --from=build-env /opt/app-root/src/backfill-redis /usr/local/bin/backfill-redis
WORKDIR /opt/app-root/src/home

#ENTRYPOINT
ENTRYPOINT [ "backfill-redis" ]
19 changes: 10 additions & 9 deletions redhat/patches/0001-dockerfile.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Dockerfile b/Dockerfile
index 067c238..82d38c1 100644
index 067c238..f91be3a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,7 +13,7 @@
Expand All @@ -11,22 +11,16 @@ index 067c238..82d38c1 100644
ENV APP_ROOT=/opt/app-root
ENV GOPATH=$APP_ROOT

@@ -31,7 +31,13 @@ RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o
@@ -31,7 +31,7 @@ RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o
RUN go test -c -ldflags "${SERVER_LDFLAGS}" -cover -covermode=count -coverpkg=./... -o rekor-server_test ./cmd/rekor-server

# Multi-Stage production build
-FROM golang:1.21.1@sha256:c416ceeec1cdf037b80baef1ccb402c230ab83a9134b34c0902c542eb4539c82 as deploy
+FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f as deploy
+
+LABEL description="Rekor provides an immutable tamper resistant ledger of metadata generated within a software projects supply chain."
+LABEL io.k8s.description="Rekor provides an immutable tamper resistant ledger of metadata generated within a software projects supply chain."
+LABEL io.k8s.display-name="Rekor container image for Red Hat Trusted Signer"
+LABEL io.openshift.tags="rekor trusted-signer"
+LABEL summary="The rekor-server binary provides an immutable, tamper-resistant log."

# Retrieve the binary from the previous stage
COPY --from=builder /opt/app-root/src/rekor-server /usr/local/bin/rekor-server
@@ -40,12 +46,14 @@ COPY --from=builder /opt/app-root/src/rekor-server /usr/local/bin/rekor-server
@@ -40,12 +40,21 @@ COPY --from=builder /opt/app-root/src/rekor-server /usr/local/bin/rekor-server
CMD ["rekor-server", "serve"]

# debug compile options & debugger
Expand All @@ -41,6 +35,13 @@ index 067c238..82d38c1 100644

-FROM deploy as test
+FROM registry.access.redhat.com/ubi9/go-toolset@sha256:e91cbbd0b659498d029dd43e050c8a009c403146bfba22cbebca8bcd0ee7925f as test
+
+LABEL description="Rekor provides an immutable tamper resistant ledger of metadata generated within a software projects supply chain."
+LABEL io.k8s.description="Rekor provides an immutable tamper resistant ledger of metadata generated within a software projects supply chain."
+LABEL io.k8s.display-name="Rekor container image for Red Hat Trusted Signer"
+LABEL io.openshift.tags="rekor trusted-signer"
+LABEL summary="The rekor-server binary provides an immutable, tamper-resistant log."
+
+COPY --from=deploy /usr/local/bin/rekor-server /usr/local/bin/rekor-server
# overwrite server with test build with code coverage
COPY --from=builder /opt/app-root/src/rekor-server_test /usr/local/bin/rekor-server

0 comments on commit a438efa

Please sign in to comment.