-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile.kubernikus
30 lines (28 loc) · 1.17 KB
/
Dockerfile.kubernikus
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
ARG DOCS_IMAGE=keppel.eu-de-1.cloud.sap/ccloud/kubernikus-docs-builder:latest
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/golang:1.22-alpine3.19 as builder
WORKDIR /app
RUN apk add --no-cache make bash git curl gcc musl-dev
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
COPY . .
ENV GOARCH=amd64
ARG VERSION
RUN make linters
RUN make all
RUN make gotest
RUN make build-e2e
FROM ${DOCS_IMAGE} as kubernikus-docs
FROM keppel.eu-de-1.cloud.sap/ccloud-dockerhub-mirror/library/alpine:3.19 as kubernikus
LABEL source_repository="https://github.com/sapcc/kubernikus"
MAINTAINER "Fabian Ruff <[email protected]>"
RUN apk add --no-cache curl iptables
RUN curl -Lo /bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64 \
&& chmod +x /bin/dumb-init \
&& dumb-init -V
COPY etc/*.json /etc/kubernikus/
COPY --from=kubernikus-docs /public/docs /static/docs
COPY charts/ /etc/kubernikus/charts
COPY --from=builder /app/bin/linux/kubernikus \
/app/bin/linux/apiserver \
/app/bin/linux/wormhole /usr/local/bin/
ENTRYPOINT ["dumb-init", "--"]
CMD ["apiserver"]