-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile
45 lines (32 loc) · 970 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
37
38
39
40
41
42
43
44
45
ARG BASE_IMAGE=gcr.io/distroless/base-debian12
# Copy the controller-manager into a thin image
FROM ${BASE_IMAGE}
## --------------------------------------
## Environment variables
## --------------------------------------
ENV GOOS=${TARGETOS}
ENV GOARCH=${TARGETARCH}
## --------------------------------------
## Build information
## --------------------------------------
ARG BUILD_BRANCH
ARG BUILD_COMMIT
ARG BUILD_NUMBER
ARG BUILD_VERSION
## --------------------------------------
## Image labels
## --------------------------------------
LABEL branch="${BUILD_BRANCH}" \
buildNumber="${BUILD_NUMBER}" \
commit="${BUILD_COMMIT}" \
name="VM Operator" \
vendor="Broadcom" \
version="${BUILD_VERSION}"
## --------------------------------------
## Copy the binaries from the builder
## --------------------------------------
WORKDIR /
COPY ./bin/manager .
COPY ./bin/web-console-validator .
USER nobody
ENTRYPOINT ["/manager"]