forked from bf2fc6cc711aee1a0c2a/kas-fleet-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (25 loc) · 947 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
36
FROM registry.access.redhat.com/ubi9-minimal:9.1.0 AS builder
RUN microdnf install -y tar gzip make which git
# install go 1.19.6
RUN curl -O -J https://dl.google.com/go/go1.19.6.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.19.6.linux-amd64.tar.gz
RUN ln -s /usr/local/go/bin/go /usr/local/bin/go
WORKDIR /workspace
# Copy Go module related files. Done as a separate
# step to invalidate the next layers in case of a change
# in the dependency specifications
COPY go.mod go.sum ./
RUN go mod download
# Copy rest of the files containing
# the source code
COPY . ./
RUN make binary
FROM registry.access.redhat.com/ubi9-minimal:9.1.0
COPY --from=builder /workspace/kas-fleet-manager /usr/local/bin/
EXPOSE 8000
ENTRYPOINT ["/usr/local/bin/kas-fleet-manager", "serve"]
LABEL name="kas-fleet-manager" \
vendor="Red Hat" \
version="0.0.1" \
summary="KasFleetManager" \
description="Kafka Service Fleet Manager"