forked from project-kessel/inventory-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 796 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 796 Bytes
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/ubi-minimal:9.7-1773204619 AS builder
ARG TARGETARCH
USER root
RUN microdnf install -y tar gzip make which gcc gcc-c++ cyrus-sasl-lib findutils git go-toolset
WORKDIR /workspace
COPY go.mod go.sum ./
ENV CGO_ENABLED 1
RUN go mod download
COPY api ./api
COPY cmd ./cmd
COPY internal ./internal
COPY main.go Makefile ./
ARG VERSION
RUN VERSION=${VERSION} make build
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1773204619
COPY --from=builder /workspace/bin/inventory-api /usr/local/bin/
EXPOSE 8081
EXPOSE 9081
USER 1001
ENV PATH="$PATH:/usr/local/bin"
ENTRYPOINT ["inventory-api"]
LABEL name="kessel-inventory-api" \
version="0.0.1" \
summary="Kessel inventory-api service" \
description="The Kessel inventory-api service"