2 Star 2 Fork 0

看繁星/dirName

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 731 Bytes
一键复制 编辑 原始数据 按行查看 历史
看繁星 提交于 2024-02-20 15:28 . Dockerfile
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 restful/etc /app/etc
RUN go build -ldflags="-s -w" -o /app/dif server/server.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/dif /app/dif
#COPY --from=builder /app/etc /app/etc
CMD ["./dif", "-f"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kanfanxing/dif.git
git@gitee.com:kanfanxing/dif.git
kanfanxing
dif
dirName
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385