代码拉取完成,页面将自动刷新
同步操作将从 飞致云X-Lab/KubeOperator 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
FROM golang:1.14 as stage-build
LABEL stage=stage-build
WORKDIR /build/ko
ARG GOPROXY
ARG GOARCH
ARG XPACK
ENV GOARCH=$GOARCH
ENV GO111MODULE=on
ENV GOOS=linux
ENV CGO_ENABLED=1
RUN apt-get update && apt-get install unzip
COPY go.mod go.sum ./
RUN go mod download
RUN wget https://github.com/go-bindata/go-bindata/archive/v3.1.3.zip -O /tmp/go-bindata.zip \
&& cd /tmp \
&& unzip /tmp/go-bindata.zip \
&& cd /tmp/go-bindata-3.1.3 \
&& go build \
&& cd go-bindata \
&& go build \
&& cp go-bindata /go/bin
RUN export PATH=$PATH:$GOPATH/bin
COPY . .
RUN make build_server_linux GOARCH=$GOARCH
RUN if [ "$XPACK" = "yes" ] ; then cd xpack && sed -i 's/ ..\/KubeOperator/ \..\/..\/ko/g' go.mod && make build_linux GOARCH=$GOARCH && cp -r dist/* ../dist/ ; fi
FROM ubuntu:20.04
ARG GOARCH
RUN apt-get update && \
apt -y upgrade && \
apt-get -y install wget curl git iputils-ping
RUN setcap cap_net_raw=+ep /bin/ping
WORKDIR /usr/local/bin
RUN wget https://fit2cloud-support.oss-cn-beijing.aliyuncs.com/xpack-license/validator_linux_$GOARCH && chmod +x validator_linux_$GOARCH
RUN wget https://kubeoperator.oss-cn-beijing.aliyuncs.com/ko-encrypt/encrypt_linux_$GOARCH && chmod +x encrypt_linux_$GOARCH
WORKDIR /tmp
RUN wget https://github.com/FairwindsOps/polaris/archive/4.1.0.tar.gz -O ./polaris.tar.gz \
&& tar zxvf ./polaris.tar.gz \
&& mv ./polaris-4.1.0/checks/ /checks
RUN wget https://dl.k8s.io/v1.18.6/kubernetes-client-linux-$GOARCH.tar.gz && tar -zvxf kubernetes-client-linux-$GOARCH.tar.gz
RUN cp ./kubernetes/client/bin/* /usr/local/bin
RUN chmod +x /usr/local/bin/kubectl
WORKDIR /
COPY --from=stage-build /build/ko/dist/etc /etc/
COPY --from=stage-build /usr/local/go/lib/time/zoneinfo.zip /opt/zoneinfo.zip
ENV ZONEINFO /opt/zoneinfo.zip
COPY --from=stage-build /build/ko/dist/etc /etc/
COPY --from=stage-build /build/ko/dist/usr /usr/
EXPOSE 8080
CMD ["ko-server"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。