forked from opendatahub-io/model-registry-bf4-kf
-
Notifications
You must be signed in to change notification settings - Fork 0
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 opendatahub-io#1 from red-hat-data-services/konflu…
…x-2.16 Review Dockerfile file for building odh-model-registry in konflux
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Build arguments | ||
ARG SOURCE_CODE=. | ||
|
||
FROM registry.redhat.io/ubi8/go-toolset@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 as builder | ||
|
||
## Build args to be used at this step | ||
ARG SOURCE_CODE | ||
|
||
USER root | ||
|
||
WORKDIR /workspace | ||
|
||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY . . | ||
|
||
RUN CGO_ENABLED=1 GOOS=linux go build -tags strictfipsruntime -a -o model-registry main.go | ||
|
||
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c | ||
|
||
WORKDIR / | ||
|
||
COPY --from=builder /workspace/model-registry . | ||
|
||
RUN chmod +x /model-registry | ||
|
||
USER root | ||
|
||
USER 1001 | ||
|
||
# Expose default proxy port | ||
EXPOSE 8080 | ||
|
||
# Start the model registry proxy | ||
CMD /model-registry proxy -logtostderr=true | ||
|
||
LABEL com.redhat.component="odh-model-registry-container" \ | ||
name="managed-open-data-hub/odh-model-registry-rhel8" \ | ||
description="Container that provides a central repository for model developers to store and manage models, versions, and artifacts metadata." \ | ||
summary="odh-model-registry" \ | ||
maintainer="['managed-open-data-hub@redhat.com']" \ | ||
io.openshift.expose-services="" \ | ||
io.k8s.display-name="odh-model-registry" \ | ||
io.k8s.description="odh-model-registry" \ | ||
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf" |