forked from flightctl/flightctl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.api
More file actions
30 lines (26 loc) · 807 Bytes
/
Containerfile.api
File metadata and controls
30 lines (26 loc) · 807 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
FROM registry.access.redhat.com/ubi9/go-toolset:1.22 as build
WORKDIR /app
ARG SOURCE_GIT_TAG
ARG SOURCE_GIT_TREE_STATE
ARG SOURCE_GIT_COMMIT
COPY ./.git .git
COPY ./api api
COPY ./cmd cmd
COPY ./deploy deploy
COPY ./hack hack
COPY ./internal internal
COPY ./go.* ./
COPY ./pkg pkg
COPY ./test test
COPY ./Makefile .
USER 0
RUN git config --global --add safe.directory /app
RUN make build-api
FROM registry.access.redhat.com/ubi9/ubi as certs
RUN dnf update --nodocs -y && dnf install ca-certificates tzdata --nodocs -y
FROM registry.access.redhat.com/ubi9/ubi-micro
WORKDIR /app
COPY --from=build /app/bin/flightctl-api .
COPY --from=certs /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem /etc/pki/ca-trust/extracted/pem/
COPY --from=certs /usr/share/zoneinfo /usr/share/zoneinfo
CMD ./flightctl-api