forked from vesoft-inc/nebula-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.multiarch
35 lines (28 loc) · 1.36 KB
/
Dockerfile.multiarch
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
FROM alpine:3.18.2
ARG TARGETPLATFORM
ARG TARGETARCH
ARG USERNAME
RUN if [ "$USERNAME" = "ng-user" ]; then \
addgroup -S -g 65532 ng-user && \
adduser -S -D -H -u 65532 \
-s /sbin/nologin -G ng-user -g ng-user ng-user; \
fi
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
curl \
&& rm -rf /var/cache/apk/*
RUN mkdir -p /tmp/nebula-operator
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/local/bin
ADD charts/nebula-operator/crds/nebulaautoscalers.yaml /tmp/nebula-operator/nebulaautoscalers.yaml
ADD charts/nebula-operator/crds/nebulaclusters.yaml /tmp/nebula-operator/nebulaclusters.yaml
ADD charts/nebula-operator/crds/nebularestores.yaml /tmp/nebula-operator/nebularestores.yaml
ADD charts/nebula-operator/crds/nebulabackups.yaml /tmp/nebula-operator/nebulabackups.yaml
ADD charts/nebula-operator/crds/nebulacronbackups.yaml /tmp/nebula-operator/nebulacronbackups.yaml
ADD bin/${TARGETPLATFORM}/controller-manager /usr/local/bin/controller-manager
ADD bin/${TARGETPLATFORM}/autoscaler /usr/local/bin/autoscaler
ADD bin/${TARGETPLATFORM}/scheduler /usr/local/bin/scheduler
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME