3 Star 21 Fork 7

Gitee 极速下载/cointop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/miguelmota/cointop
克隆/下载
Dockerfile 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
ѵµσɳɠ 提交于 2021-11-07 17:48 +08:00 . Fix Docker build
FROM golang:alpine AS build
ARG VERSION
RUN wget \
--output-document "/cointop-$VERSION.tar.gz" \
"https://github.com/cointop-sh/cointop/archive/refs/tags/$VERSION.tar.gz" \
&& wget \
--output-document "/cointop-colors-master.tar.gz" \
"https://github.com/cointop-sh/colors/archive/master.tar.gz" \
&& mkdir --parents \
"$GOPATH/src/github.com/cointop-sh/cointop" \
"/usr/local/share/cointop/colors" \
&& tar \
--directory "$GOPATH/src/github.com/cointop-sh/cointop" \
--extract \
--file "/cointop-$VERSION.tar.gz" \
--strip-components 1 \
&& tar \
--directory /usr/local/share/cointop/colors \
--extract \
--file /cointop-colors-master.tar.gz \
--strip-components 1 \
&& rm \
"/cointop-$VERSION.tar.gz" \
/cointop-colors-master.tar.gz \
&& cd "$GOPATH/src/github.com/cointop-sh/cointop" \
&& CGO_ENABLED=0 go install -ldflags "-s -w -X 'github.com/cointop-sh/cointop/cointop.version=$VERSION'" \
&& cd "$GOPATH" \
&& rm -r src/github.com \
&& apk add --no-cache upx \
&& upx --lzma /go/bin/cointop \
&& apk del upx
FROM busybox
ARG VERSION
ARG MAINTAINER
COPY --from=build /etc/ssl/certs /etc/ssl/certs
COPY --from=build /go/bin/cointop /usr/local/bin/cointop
COPY --from=build /usr/local/share /usr/local/share
ENV \
COINTOP_COLORS_DIR=/usr/local/share/cointop/colors \
XDG_CONFIG_HOME=/config
EXPOSE 2222
LABEL \
maintainer="$MAINTAINER" \
version="$VERSION"
ENTRYPOINT ["cointop"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mirrors/cointop.git
git@gitee.com:mirrors/cointop.git
mirrors
cointop
cointop
master

搜索帮助