forked from opendatahub-io/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.konflux
49 lines (32 loc) · 1.36 KB
/
Dockerfile.konflux
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 arguments
ARG SOURCE_CODE=.
FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 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:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67
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"