1 Star 0 Fork 139

jonyleelplxy/driver-box_1

forked from iBUILDING-X/driver-box 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Dockerfile 932 Bytes
一键复制 编辑 原始数据 按行查看 历史
小菜LC 提交于 2023-07-24 19:08 . 优化
FROM golang:1.18-alpine AS builder
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
WORKDIR /build
COPY ./driver-config ./driver-config
COPY ./driverbox ./driverbox
COPY ./internal ./internal
COPY ./go.sum ./go.sum
COPY ./go.mod ./go.mod
COPY ./main.go ./main.go
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && \
# apk update && apk add pkgconfig zeromq-dev gcc libc-dev && \
go mod tidy && \
go mod vendor && \
go build -o driver-box .
FROM alpine:latest
WORKDIR /
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories && \
apk update && apk add curl tzdata && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apk del tzdata && \
rm -rf /var/cache/apk/*
COPY --from=builder /build/driver-box /driver-box
EXPOSE 59999
ENTRYPOINT ["/driver-box"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jonyleelplxy/driver-box_1.git
git@gitee.com:jonyleelplxy/driver-box_1.git
jonyleelplxy
driver-box_1
driver-box_1
master

搜索帮助