1 Star 0 Fork 2

天马行空/kubei

forked from Gitee 极速下载/kubei 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile.cli 787 Bytes
一键复制 编辑 原始数据 按行查看 历史
Idan Frimark 提交于 2022-03-31 14:14 . KubeClarity first commit (#99)
FROM golang:1.17.3-alpine AS builder
ARG COMMIT_HASH
RUN apk add --update --no-cache ca-certificates git
RUN apk add build-base
WORKDIR /build
COPY api ./api
# Copy shared go.mod & go.sum
WORKDIR /build/shared
COPY shared/go.* ./
RUN go mod download
# Copy cli go.mod & go.sum
WORKDIR /build/cli
COPY cli/go.* ./
RUN go mod download
# Copy shared code
WORKDIR /build/shared
COPY shared .
# Copy and build cli code
WORKDIR /build/cli
COPY cli .
RUN go build -ldflags="-s -w \
-X 'github.com/cisco-open/kubei/cli/pkg.GitRevision=${COMMIT_HASH}'" -o cli ./main.go
RUN go build -ldflags "${LDFLAGS}" ./...
FROM alpine:3.15.0
WORKDIR /app
COPY --from=builder /build/cli/cli ./cli
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENTRYPOINT ["/app/cli"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML/CSS
1
https://gitee.com/IMGet/kubei.git
git@gitee.com:IMGet/kubei.git
IMGet
kubei
kubei
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385