forked from opendatahub-io/rest-proxy
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.konflux
40 lines (27 loc) · 1.19 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
#go-toolset:1.21
FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 AS build
LABEL image="build"
USER root
WORKDIR /opt/app
COPY go.mod go.sum ./
# Download dependencies before copying the source so they will be cached
RUN go mod download
# Copy the source
COPY . ./
# Build the binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o /go/bin/server ./proxy/
#ubi-micro
FROM registry.access.redhat.com/ubi8/ubi-micro@sha256:22448ec2e9234d99a2cd9adf9e571a367d1e4b0e1546b2b5c36518e5183e1b32 as runtime
ARG USER=2000
LABEL com.redhat.component="odh-mm-rest-proxy-container" \
name="managed-open-data-hub/odh-mm-rest-proxy-rhel8" \
description="Converts RESTfull API calls into gRPC" \
summary="odh-mm-rest-proxy" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="modelmesh-rest-proxy" \
io.k8s.description="modelmesh-rest-proxy" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
USER ${USER}
COPY --from=build /go/bin/server /go/bin/server
CMD ["/go/bin/server"]