forked from fluid-cloudnative/fluid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.webhook
31 lines (22 loc) · 990 Bytes
/
Dockerfile.webhook
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
# Build the dataset-controller manager binary
FROM golang:1.17.8 as builder
WORKDIR /go/src/github.com/fluid-cloudnative/fluid
COPY . .
RUN make webhook-build && \
cp bin/fluid-webhook /go/bin/fluid-webhook
# Debug
RUN go install github.com/go-delve/delve/cmd/[email protected]
FROM alpine:3.16
RUN apk add --update curl tzdata iproute2 bash libc6-compat vim && \
rm -rf /var/cache/apk/* && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone
ARG TARGETARCH
ENV K8S_VERSION v1.14.8
RUN curl -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/${TARGETARCH}/kubectl && chmod +x /usr/local/bin/kubectl
COPY --from=builder /go/bin/fluid-webhook /usr/local/bin/fluid-webhook
COPY --from=builder /go/bin/dlv /usr/local/bin/dlv
RUN mkdir -p /etc/k8s-webhook-server/certs && \
chmod -R u+w /etc/k8s-webhook-server/certs && \
chmod -R u+x /usr/local/bin/
CMD ["fluid-webhook", "start"]