Commit c8b8c94c authored by Li Mi's avatar Li Mi

官方不理我我就自己动手咯

parent f93b1bb5
FROM alpine FROM golang:alpine
RUN apk update && \ RUN apk update && \
apk add wget curl unzip tar gzip ca-certificates apk add wget curl unzip tar gzip ca-certificates busybox upx
RUN curl https://api.github.com/repos/pterodactyl/wings/releases/latest \ RUN curl https://api.github.com/repos/pterodactyl/wings/releases/latest \
| grep browser_download_url \ grep tarball_url \
| grep wings_linux_amd64 \ cut -d '"' -f 4 \
| cut -d '"' -f 4 \ wget -i - -O tarball.tar.gz
| wget -i - RUN mkdir wings
RUN chmod +x wings_linux_amd64 RUN tar xvzf tarball.tar.gz -C wings --strip-components=1
RUN cd wings && \
&& CGO_ENABLED=0 go build -ldflags="-s -w" -o wings \
&& upx --brute wings \
chmod +x wings \
cp wings /wings
# 第二阶段,只有二进制文件 # 第二阶段,只有二进制文件
FROM alpine FROM alpine
# 最后修复了库问题 # 最后修复了库问题
# 直到翼龙关闭CGO编译 # 直到翼龙关闭CGO编译
RUN apk update && \ RUN apk update && \
apk add ca-certificates \ apk add ca-certificates
mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 COPY --from=0 /wings /wings
COPY --from=0 /wings_linux_amd64 /wings
CMD [ "/wings" ] CMD [ "/wings" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment