mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-04 09:17:32 -05:00
remove docker def
This commit is contained in:
parent
2cf809021b
commit
94c6acea43
@ -1,15 +0,0 @@
|
||||
FROM golang:latest
|
||||
|
||||
RUN go get -u v2ray.com/core/... \
|
||||
&& rm -f $GOPATH/bin/build \
|
||||
&& go install v2ray.com/core/tools/build \
|
||||
&& build \
|
||||
&& mv bin/v2ray-custom-linux-64/v2ray bin \
|
||||
&& rm -rf pkg src
|
||||
|
||||
EXPOSE 27183
|
||||
COPY gen-server-cfg.sh /go/gen-server-cfg.sh
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["v2ray", "--config=/go/server-cfg.json"]
|
@ -1,36 +0,0 @@
|
||||
Docker build for v2ray
|
||||
=======================
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
To build the image:
|
||||
|
||||
```bash
|
||||
./build.sh
|
||||
```
|
||||
|
||||
Then spin up a v2ray instance with:
|
||||
|
||||
```bash
|
||||
./run.sh
|
||||
```
|
||||
|
||||
The docker image will generate a server config file with random user id on first run.
|
||||
You can get see it with:
|
||||
|
||||
```bash
|
||||
docker logs v2ray
|
||||
```
|
||||
|
||||
You can also specify config file by manual with:
|
||||
|
||||
```bash
|
||||
docker run -d --name=v2ray -p 27183:27183 -v /config/file.json:/go/server-config.json $USER/v2ray
|
||||
```
|
||||
|
||||
To tail the access log, run:
|
||||
|
||||
```bash
|
||||
docker exec v2ray tail -F /go/access.log
|
||||
```
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker build --rm=true --tag=$USER/v2ray ./
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ "$1" = 'v2ray' ]; then
|
||||
if [ ! -e "server-cfg.json" ]; then
|
||||
./gen-server-cfg.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
PORT=27183
|
||||
|
||||
rand_str () {
|
||||
cat /dev/urandom | tr -dc 'a-f0-9' | fold -w $1 | head -n 1
|
||||
}
|
||||
|
||||
ID="$(rand_str 8)-$(rand_str 4)-$(rand_str 4)-$(rand_str 4)-$(rand_str 12)"
|
||||
echo "Generated client ID: $ID"
|
||||
|
||||
cat <<EOF > server-cfg.json
|
||||
{
|
||||
"log" : {
|
||||
"access": "/go/access.log"
|
||||
},
|
||||
"inbound": {
|
||||
"port": $PORT,
|
||||
"protocol": "vmess",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{"id": "$ID"}
|
||||
]
|
||||
}
|
||||
},
|
||||
"outbound": {
|
||||
"protocol": "freedom",
|
||||
"settings": {}
|
||||
}
|
||||
}
|
||||
EOF
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run -d --name=v2ray -p 27183:27183/tcp $USER/v2ray
|
Loading…
Reference in New Issue
Block a user