This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathDockerfile
43 lines (30 loc) · 1.6 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
40
41
42
43
FROM golang:1.17 as build
ENV GO111MODULE=on
RUN useradd -u 1000 casskop
RUN mkdir -p /tmp && chown casskop /tmp
ADD . /casskop
WORKDIR /casskop
RUN go mod download
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o casskop main.go
FROM gcr.io/distroless/base
WORKDIR /
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /tmp /tmp
COPY --from=build /casskop/casskop /usr/local/bin/casskop
USER casskop
LABEL org.opencontainers.image.documentation="https://github.com/Orange-OpenSource/casskop/blob/master/README.md"
LABEL org.opencontainers.image.authors="Sébastien Allamand <sebastien.allamand@orange.com>"
LABEL org.opencontainers.image.source="https://github.com/Orange-OpenSource/casskop"
LABEL org.opencontainers.image.vendor="Orange France - Digital Factory"
LABEL org.opencontainers.image.version="0.1"
LABEL org.opencontainers.image.description="Operateur des Gestion de Clusters Cassandra"
LABEL org.opencontainers.image.url="https://github.com/Orange-OpenSource/casskop"
LABEL org.opencontainers.image.title="Operateur Cassandra"
LABEL org.label-schema.usage="https://github.com/Orange-OpenSource/casskop/blob/master/README.md"
LABEL org.label-schema.docker.cmd.devel="N/A"
LABEL org.label-schema.docker.cmd.test="N/A"
LABEL org.label-schema.docker.cmd.help="N/A"
LABEL org.label-schema.docker.cmd.debug="N/A"
LABEL org.label-schema.docker.params="LOG_LEVEL=define loglevel,RESYNC_PERIOD=period in second to execute resynchronisation,WATCH_NAMESPACE=namespace to watch for cassandraclusters,OPERATOR_NAME=name of the operator instance pod"
ENTRYPOINT ["/usr/local/bin/casskop"]