1 Star 0 Fork 2

天马行空/kubei

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

搜索帮助

0d507c66 1850385 C8b1a773 1850385