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 b84396f commit b384e90
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
# Alpine v3
FROM alpine:latest as builder
LABEL maintainer "ifmm"

# 安装依赖
RUN apk update && apk add make gcc libc-dev
FROM alpine:latest

# 编译 UDPXY
WORKDIR /tmp
RUN wget -O 1.0-25.1.tar.gz https://github.com/pcherenkov/udpxy/archive/refs/tags/1.0-25.1.tar.gz \
&& tar zxf 1.0-25.1.tar.gz \
&& cd udpxy-* && make && make install
# 安装 udpxy
RUN apk update && apk add --no-cache udpxy

# Alpine v3
FROM alpine:latest
LABEL maintainer "ifmm"
# 设置默认的工作目录
WORKDIR /app

# Docker 启动
COPY --from=builder /usr/local/bin/udpxy /usr/local/bin/udpxy
COPY --from=builder /usr/local/bin/udpxrec /usr/local/bin/udpxrec
# 暴露 udpxy 所需的端口(例如5893)
EXPOSE 5893

ENTRYPOINT ["/usr/local/bin/udpxy"]
CMD ["-v", "-T", "-p", "5893"]
# 运行 udpxy 时的默认命令
CMD ["udpxy", "-p", "5893"]

0 comments on commit b384e90

Please sign in to comment.