forked from sigstore/rekor
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from Gregory-Pereira/redhat-v1.3-bump-go-base…
…-image-1.21 chore: bump go version of base image to 1.21 RHTAP builds succeed and it was already approved --> merging.
- Loading branch information
Showing
3 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,18 +13,19 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS builder | ||
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder@sha256:98a0ff138c536eee98704d6909699ad5d0725a20573e2c510a60ef462b45cce0 AS build-env | ||
ENV APP_ROOT=/opt/app-root | ||
ENV GOPATH=$APP_ROOT | ||
|
||
WORKDIR $APP_ROOT/src/ | ||
ADD go.mod go.sum $APP_ROOT/src/ | ||
RUN go mod download | ||
|
||
# Add source code | ||
ADD ./cmd/ $APP_ROOT/src/cmd/ | ||
ADD ./pkg/ $APP_ROOT/src/pkg/ | ||
|
||
RUN go mod tidy && go mod vendor | ||
|
||
ARG SERVER_LDFLAGS | ||
RUN go build -ldflags "${SERVER_LDFLAGS}" ./cmd/rekor-server | ||
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -ldflags "${SERVER_LDFLAGS}" -o rekor-server_debug ./cmd/rekor-server | ||
|
@@ -35,7 +36,7 @@ FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424d | |
RUN go install github.com/go-delve/delve/cmd/[email protected] | ||
|
||
# overwrite server and include debugger | ||
COPY --from=builder /opt/app-root/src/rekor-server_debug /usr/local/bin/rekor-server | ||
COPY --from=build-env /opt/app-root/src/rekor-server_debug /usr/local/bin/rekor-server | ||
|
||
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca as test | ||
|
||
|
@@ -53,7 +54,7 @@ RUN mkdir -p /var/run/attestations && \ | |
chmod 777 /var/run/attestations/attestation.json | ||
|
||
# overwrite server with test build with code coverage | ||
COPY --from=builder /opt/app-root/src/rekor-server_test /usr/local/bin/rekor-server | ||
COPY --from=build-env /opt/app-root/src/rekor-server_test /usr/local/bin/rekor-server | ||
|
||
# Multi-Stage production build | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624 as deploy | ||
|
@@ -66,7 +67,7 @@ LABEL summary="Provides the rekor Server binary for running Rekor-Server" | |
LABEL com.redhat.component="rekor-server" | ||
|
||
# Retrieve the binary from the previous stage | ||
COPY --from=builder /opt/app-root/src/rekor-server /usr/local/bin/rekor-server | ||
COPY --from=build-env /opt/app-root/src/rekor-server /usr/local/bin/rekor-server | ||
|
||
# Set the binary as the entrypoint of the container | ||
ENTRYPOINT ["rekor-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters