1 Star 0 Fork 0

tangjianlin/K8s-jenkins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 753 Bytes
一键复制 编辑 原始数据 按行查看 历史
tangjianlin 提交于 2023-11-17 20:48 . first commit
FROM golang:alpine AS builder
LABEL stage=gobuilder
ENV CGO_ENABLED 0
ENV GOPROXY https://goproxy.cn,direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update --no-cache && apk add --no-cache tzdata
WORKDIR /build
ADD go.mod .
ADD go.sum .
RUN go mod download
COPY . .
COPY ./etc/ app/etc
RUN go build -ldflags="-s -w" -o /app/apicode apicode.go
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /usr/share/zoneinfo/Asia/Shanghai /usr/share/zoneinfo/Asia/Shanghai
ENV TZ Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/apicode /app/apicode
COPY --from=builder /app/etc /app/etc
CMD ["./apicode","-f","etc/apicode.yaml"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/tangjianlin153/k8s-jenkins.git
git@gitee.com:tangjianlin153/k8s-jenkins.git
tangjianlin153
k8s-jenkins
K8s-jenkins
master

搜索帮助