-
Notifications
You must be signed in to change notification settings - Fork 76
/
Dockerfile
39 lines (29 loc) · 1.09 KB
/
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
# Build the mattermost operator
ARG BUILD_IMAGE=golang:1.22
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot
FROM ${BUILD_IMAGE} as builder
ARG TARGETARCH
ARG TARGETOS
WORKDIR /workspace
COPY . .
RUN mkdir -p licenses
COPY LICENSE /workspace/licenses
# Build
RUN make build TARGET_OS=$TARGETOS TARGET_ARCH=$TARGETARCH
FROM ${BASE_IMAGE}
LABEL name="Mattermost Operator" \
maintainer="[email protected]" \
vendor="Mattermost" \
distribution-scope="public" \
architecture="x86_64" \
url="https://mattermost.dev" \
io.k8s.description="Mattermost Operator creates, configures and helps manage Mattermost installations on Kubernetes" \
io.k8s.display-name="Mattermost Operator" \
io.openshift.tags="mattermost,collaboration,operator" \
summary="Quick and easy Mattermost setup" \
description="Mattermost operator deploys and configures Mattermost installations, and assists with maintenance/upgrade operations."
WORKDIR /
COPY --from=builder /workspace/licenses .
COPY --from=builder /workspace/build/_output/bin/mattermost-operator .
USER nonroot:nonroot
ENTRYPOINT ["/mattermost-operator"]