reconcile host cluster (#2354)
print friendly error when component failed update dockerfile
This commit is contained in:
@@ -1,23 +1,7 @@
|
||||
# Copyright 2018 The KubeSphere Authors. All rights reserved.
|
||||
# Use of this source code is governed by an Apache license
|
||||
# that can be found in the LICENSE file.
|
||||
|
||||
FROM golang:1.12 as ks-apiserver-builder
|
||||
|
||||
COPY / /go/src/kubesphere.io/kubesphere
|
||||
|
||||
WORKDIR /go/src/kubesphere.io/kubesphere
|
||||
RUN GIT_VERSION=$(git describe --always --dirty) && \
|
||||
GIT_HASH=$(git rev-parse HEAD) && \
|
||||
BUILDDATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
|
||||
CGO_ENABLED=0 GO111MODULE=on GOOS=linux GOARCH=amd64 GOFLAGS=-mod=vendor \
|
||||
go build -i -ldflags \
|
||||
'-w -s -X kubesphere.io/kubesphere/pkg/version.version=$(GIT_VERSION) \
|
||||
-X kubesphere.io/kubesphere/pkg/version.gitCommit=$(GIT_HASH) \
|
||||
-X kubesphere.io/kubesphere/pkg/version.buildDate=$(BUILDDATE)' \
|
||||
-o ks-apiserver cmd/ks-apiserver/apiserver.go
|
||||
|
||||
FROM alpine:3.9
|
||||
RUN apk add --update ca-certificates && update-ca-certificates
|
||||
COPY --from=ks-apiserver-builder /go/src/kubesphere.io/kubesphere/ks-apiserver /usr/local/bin/
|
||||
COPY /bin/cmd/ks-apiserver /usr/local/bin/
|
||||
CMD ["sh"]
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
# Copyright 2018 The KubeSphere Authors. All rights reserved.
|
||||
# Use of this source code is governed by an Apache license
|
||||
# that can be found in the LICENSE file.
|
||||
|
||||
FROM golang:1.12 as controller-manager-builder
|
||||
|
||||
COPY / /go/src/kubesphere.io/kubesphere
|
||||
WORKDIR /go/src/kubesphere.io/kubesphere
|
||||
|
||||
RUN CGO_ENABLED=0 GO111MODULE=on GOOS=linux GOARCH=amd64 GOFLAGS=-mod=vendor go build --ldflags "-extldflags -static" -o controller-manager ./cmd/controller-manager/
|
||||
|
||||
FROM alpine:3.7
|
||||
RUN apk add --update ca-certificates && update-ca-certificates
|
||||
COPY --from=controller-manager-builder /go/src/kubesphere.io/kubesphere/controller-manager /usr/local/bin/
|
||||
COPY /bin/cmd/controller-manager /usr/local/bin/
|
||||
CMD controller-manager
|
||||
|
||||
Reference in New Issue
Block a user