-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
35 lines (24 loc) · 915 Bytes
/
Dockerfile
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
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1154 AS builder
ARG TARGETARCH
USER root
RUN microdnf install -y tar gzip make which
# install platform specific go version
RUN curl -O -J https://dl.google.com/go/go1.22.7.linux-${TARGETARCH}.tar.gz
RUN tar -C /usr/local -xzf go1.22.7.linux-${TARGETARCH}.tar.gz
RUN ln -s /usr/local/go/bin/go /usr/local/bin/go
WORKDIR /workspace
COPY . ./
RUN go mod vendor
RUN make build
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10-1154
RUN mkdir /config
COPY --from=builder /workspace/bin/kessel-relations /usr/local/bin/
COPY --from=builder /workspace/configs/config.yaml /config
EXPOSE 8000
EXPOSE 9000
USER 1001
ENTRYPOINT ["/usr/local/bin/kessel-relations","-conf","/config/config.yaml"]
LABEL name="kessel-relations-api" \
version="0.0.1" \
summary="Kessel relations-api service" \
description="The Kessel relations-api service"