1 Star 0 Fork 142

utopia/物联网云平台

forked from 联犀/物联网iot模块 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 704 Bytes
一键复制 编辑 原始数据 按行查看 历史
MoFan 提交于 2022-09-09 03:21 +08:00 . chore: docker-compose && dockerfile
FROM golang:1.19-alpine3.16 as go-builder
ARG SVR_NAME
ARG GOPROXY=goproxy.cn
ENV GOPROXY=https://${GOPROXY},direct
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache make
WORKDIR /ithings/
COPY src/ src/
COPY shared/ shared/
COPY go.mod go.sum Makefile ./
RUN go mod download -x
RUN make build.${SVR_NAME}
FROM alpine:3.16
ARG SVR_NAME
LABEL name="${SVR_NAME}svr"
LABEL author="wwhai"
LABEL email="cnwwhai@gmail.com"
LABEL homepage="https://github.com/i4de/ithings"
WORKDIR /ithings/
COPY --from=go-builder /ithings/cmd/${SVR_NAME}svr ./bin/svr
COPY --from=go-builder /ithings/src/${SVR_NAME}svr/etc ./etc
EXPOSE 2580
ENTRYPOINT ["./bin/svr"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dty1996/things.git
git@gitee.com:dty1996/things.git
dty1996
things
物联网云平台
master

搜索帮助