From 75cf2c110b9b528abc791381bef91c31c831370c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E6=98=8E=E6=98=8E?= Date: Sun, 25 Aug 2024 14:02:33 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c792ee3..366db98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,23 @@ # Alpine v3 -FROM alpine:latest as builder -LABEL maintainer "fanmingming" +FROM alpine:3.15 as builder +LABEL maintainer="fanmingming" # 安装依赖 -RUN apk update && apk add --no-cache make gcc libc-dev +RUN apk update && apk add --no-cache make gcc libc-dev wget # 编译 UDPXY WORKDIR /tmp RUN wget -O udpxy.tar.gz https://github.com/pcherenkov/udpxy/archive/refs/tags/1.0-25.1.tar.gz \ && tar zxf udpxy.tar.gz \ - && cd udpxy-* && make && make install \ - && rm -rf /tmp/udpxy-* # 删除源码文件 + && cd udpxy-* && make && make install + +# 删除不必要的文件和包 +RUN apk del make gcc libc-dev wget \ + && rm -rf /tmp/udpxy-* # Alpine v3 -FROM alpine:latest -LABEL maintainer "fanmingming" +FROM alpine:3.15 +LABEL maintainer="fanmingming" # Docker 启动 COPY --from=builder /usr/local/bin/udpxy /usr/local/bin/udpxy