mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
[docker] refine Dockerfile
This commit is contained in:
parent
22e867cb85
commit
38dbd38f67
@ -4,6 +4,7 @@ RUN go get -u github.com/v2ray/v2ray-core \
|
||||
&& rm -f $GOPATH/bin/build \
|
||||
&& go install github.com/v2ray/v2ray-core/tools/build \
|
||||
&& build \
|
||||
&& mv bin/v2ray-custom-linux-64/v2ray bin \
|
||||
&& rm -rf pkg src
|
||||
|
||||
EXPOSE 27183
|
||||
@ -11,4 +12,4 @@ 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"]
|
||||
CMD ["v2ray", "--config=/go/server-cfg.json"]
|
||||
|
@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! -e "server-cfg.json" ]; then
|
||||
./gen-server-cfg.sh
|
||||
if [ "$1" = 'v2ray' ]; then
|
||||
if [ ! -e "server-cfg.json" ]; then
|
||||
./gen-server-cfg.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user