Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fanmingming authored Aug 25, 2024
1 parent c9c4480 commit 75cf2c1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 75cf2c1

Please sign in to comment.