mirror of https://github.com/v2ray/v2ray-core
commit
5c8ac0d6e0
@ -1,10 +1,14 @@
|
||||
FROM golang:latest
|
||||
|
||||
RUN go get -u github.com/v2ray/v2ray-core
|
||||
RUN rm -f $GOPATH/bin/build
|
||||
RUN go install github.com/v2ray/v2ray-core/tools/build
|
||||
RUN $GOPATH/bin/build
|
||||
RUN go get -u github.com/v2ray/v2ray-core \
|
||||
&& rm -f $GOPATH/bin/build \
|
||||
&& go install github.com/v2ray/v2ray-core/tools/build \
|
||||
&& build \
|
||||
&& rm -rf pkg src
|
||||
|
||||
EXPOSE 27183
|
||||
ADD server-cfg.json /go/server-cfg.json
|
||||
CMD /go/bin/v2ray-custom-linux-64/v2ray --config="/go/server-cfg.json"
|
||||
COPY gen-server-cfg.sh /go/gen-server-cfg.sh
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["/go/bin/v2ray-custom-linux-64/v2ray", "--config=/go/server-cfg.json"]
|
||||
|
@ -1,7 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -e server-cfg.json ]; then
|
||||
./gen-server-config.sh
|
||||
fi
|
||||
|
||||
docker build --rm=true --tag=$USER/v2ray ./
|
||||
|
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! -e "server-cfg.json" ]; then
|
||||
./gen-server-cfg.sh
|
||||
fi
|
||||
|
||||
exec "$@"
|
Loading…
Reference in new issue