diff --git a/docker/Dockerfile b/docker/Dockerfile-alpine similarity index 100% rename from docker/Dockerfile rename to docker/Dockerfile-alpine diff --git a/docker/Dockerfile-ubuntu b/docker/Dockerfile-ubuntu new file mode 100644 index 0000000..7232a07 --- /dev/null +++ b/docker/Dockerfile-ubuntu @@ -0,0 +1,26 @@ +FROM ubuntu:22.04 AS builder +RUN apt-get -y update +RUN apt-get -y install wget git golang python3 python3.10-venv +WORKDIR / +RUN wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz +RUN tar -C /usr/local -xvf go1.21.5.linux-amd64.tar.gz +ENV PATH="$PATH:/usr/local/go/bin" +RUN git clone https://git.hmthsn.com/mantao/ovpn-lb-socks5.git +WORKDIR /ovpn-lb-socks5/go-socks-lb +RUN go build +WORKDIR /ovpn-lb-socks5 +RUN python3 -m venv env +ENV PATH="/ovpn-lb-socks5/env/bin:$PATH" +RUN python -m pip install -r docker_requirement.txt + +FROM ubuntu:22.04 +RUN apt-get -y update +RUN apt-get -y install fping iptables tini wget neovim git python3 python3.10-venv openvpn +WORKDIR / +RUN wget https://github.com/3proxy/3proxy/releases/download/0.9.4/3proxy-0.9.4.x86_64.deb +RUN dpkg -i 3proxy-0.9.4.x86_64.deb +COPY --from=builder /ovpn-lb-socks5 /mop +RUN mkdir /mop/config +#COPY --from=builder /ovpn-lb-socks5/go-socks-lb/go-socks-lb /mop/go-socks-lb +ENTRYPOINT ["/usr/bin/tini", "--"] +CMD /mop/docker-entrypoint.sh