docker files
This commit is contained in:
parent
c6661985d5
commit
a3ece11d2b
@ -1,8 +1,23 @@
|
|||||||
FROM golang:alpine
|
FROM golang:alpine AS go-builder
|
||||||
|
RUN apk --no-cache add git
|
||||||
|
WORKDIR /
|
||||||
|
RUN git clone https://git.hmthsn.com/mantao/ovpn-lb-socks5.git
|
||||||
|
WORKDIR /ovpn-lb-socks5/go-socks-lb
|
||||||
|
RUN go build
|
||||||
|
|
||||||
|
FROM alpine:latest AS python-builder
|
||||||
|
RUN apk --no-cache add git python3 python3-dev linux-headers musl-dev gcc
|
||||||
|
WORKDIR /
|
||||||
|
RUN git clone https://git.hmthsn.com/mantao/ovpn-lb-socks5.git mop
|
||||||
|
WORKDIR /mop
|
||||||
|
RUN python3 -m venv env
|
||||||
|
ENV PATH="/mop/env/bin:$PATH"
|
||||||
|
RUN pip install -r docker_requirement.txt
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories && \
|
||||||
apk add --update openvpn iptables bash git python3 shadow neovim linux-headers musl-dev 3proxy ip6tables gcc && \
|
apk --no-cache add openvpn iptables ip6tables bash python3 shadow neovim 3proxy
|
||||||
rm -rf /tmp/* /var/tmp/* /var/cache/apk/* /var/cache/distfiles/*
|
COPY --from=python-builder /mop /
|
||||||
|
COPY --from=go-builder /ovpn-lb-socks5/go-socks-lb/go-socks-lb /mop/go-socks-lb
|
||||||
CMD tail -f /dev/null
|
CMD /mop/docker-entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version: '3.4'
|
version: "3.4"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ovpn_lb_test:
|
ovpn_lb_test:
|
||||||
@ -13,4 +13,6 @@ services:
|
|||||||
- ./config:/config
|
- ./config:/config
|
||||||
cap_add:
|
cap_add:
|
||||||
- net_admin
|
- net_admin
|
||||||
|
environment:
|
||||||
|
CONFIG_FOLDER: /config
|
||||||
|
AUTH_FILE: /config/fast.txt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user