1 Star 0 Fork 40

青蛙翻身/go-admin

forked from hequan/go-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 989 Bytes
一键复制 编辑 原始数据 按行查看 历史
何全 提交于 2020-02-04 23:03 . v1.5.1 结构调整
FROM alpine:latest
USER root
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& echo "export GO111MODULE=on" >> /etc/profile \
&& echo "export GOPATH=/root/go" >> /etc/profile \
&& echo "export GOPROXY=https://mirrors.aliyun.com/goproxy/" >> /etc/profile \
&& source /etc/profile
RUN apk update && apk add go git musl-dev xz binutils \
&& cd \
&& go get -u -v go-admin \
&& go install go-admin
RUN wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz \
&& xz -d upx-3.95-amd64_linux.tar.xz \
&& tar -xvf upx-3.95-amd64_linux.tar \
&& cd upx-3.95-amd64_linux \
&& chmod a+x ./upx \
&& mv ./upx /usr/local/bin/ \
&& cd /root/go/bin \
&& strip --strip-unneeded go-admin \
&& upx go-admin \
&& chmod a+x ./go-admin \
&& cp go-admin /usr/local/bin
FROM alpine:latest
COPY --from=0 /usr/local/bin/go-admin /usr/local/bin/
EXPOSE 80
CMD ["go-admin"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/11720270/go-admin.git
git@gitee.com:11720270/go-admin.git
11720270
go-admin
go-admin
master

搜索帮助