1 Star 0 Fork 0

Crane/crane-scheduler

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 956 Bytes
一键复制 编辑 原始数据 按行查看 历史
zsnmwy 提交于 2022-08-29 00:17 . fix: CI Build
ARG PKGNAME
# Build the manager binary
FROM golang:1.17.2-alpine as builder
ARG LDFLAGS
ARG PKGNAME
WORKDIR /go/src/github.com/gocrane/crane-scheduler
# Add build deps
RUN apk add build-base
# 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 unset https_proxy HTTPS_PROXY HTTP_PROXY http_proxy && go mod download
# Copy the go source
COPY pkg pkg/
COPY cmd cmd/
# Build
RUN go build -ldflags="${LDFLAGS}" -a -o ${PKGNAME} /go/src/github.com/gocrane/crane-scheduler/cmd/${PKGNAME}/main.go
FROM alpine:3.13.5
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN unset https_proxy HTTPS_PROXY HTTP_PROXY http_proxy && apk add -U tzdata
WORKDIR /
ARG PKGNAME
COPY --from=builder /go/src/github.com/gocrane/crane-scheduler/${PKGNAME} .
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gocrane/crane-scheduler.git
git@gitee.com:gocrane/crane-scheduler.git
gocrane
crane-scheduler
crane-scheduler
main

搜索帮助