-
Notifications
You must be signed in to change notification settings - Fork 63
/
Dockerfile
30 lines (22 loc) · 604 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
FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 AS BUILDER
ARG GO_BUILD_ARGS
WORKDIR /workdir
USER root
COPY Makefile Makefile
COPY go.mod go.mod
COPY go.sum go.sum
COPY cmd cmd
COPY pkg pkg
COPY hack hack
ENV GO_BUILD_ARGS=$GO_BUILD_ARGS
RUN echo "Go build args: $GO_BUILD_ARGS" && \
make mcad-controller
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
COPY --from=BUILDER /workdir/_output/bin/mcad-controller /usr/local/bin
RUN true \
&& microdnf update \
&& microdnf clean all \
&& true
WORKDIR /usr/local/bin
RUN chown -R 1000:1000 /usr/local/bin
USER 1000