1 Star 0 Fork 37

openMajun/ms-operator

forked from MindSpore/ms-operator 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
fangzehua 提交于 2022-03-26 16:56 . remove test and add crd yaml
# Build the manager binary
FROM golang:1.17 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod download
# Copy the go source
COPY cmd/manager/main.go cmd/manager/main.go
COPY pkg/apis/ pkg/apis/
COPY pkg/controllers/v1/ pkg/controllers/v1/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager cmd/manager/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/manager .
USER 65532:65532
ENTRYPOINT ["/manager"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/openMajun/ms-operator.git
git@gitee.com:openMajun/ms-operator.git
openMajun
ms-operator
ms-operator
master

搜索帮助