forked from onplus/v2hero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM alpine:latest | ||
|
||
ENV CONFIG_JSON1=none CONFIG_JSON2=none UUID=91cb66ba-a373-43a0-8169-33d4eeaeb857 CONFIG_JSON3=none CERT_PEM=none KEY_PEM=none VER=2.51 | ||
|
||
RUN apk add --no-cache --virtual .build-deps ca-certificates curl \ | ||
&& mkdir -m 777 /v2raybin \ | ||
&& cd /v2raybin \ | ||
&& curl -L -H "Cache-Control: no-cache" -o v2ray.zip https://github.com/v2ray/v2ray-core/releases/download/v$VER/v2ray-linux-64.zip \ | ||
&& unzip v2ray.zip \ | ||
&& mv /v2raybin/v2ray-v$VER-linux-64/v2ray /v2raybin/ \ | ||
&& mv /v2raybin/v2ray-v$VER-linux-64/v2ctl /v2raybin/ \ | ||
&& mv /v2raybin/v2ray-v$VER-linux-64/geoip.dat /v2raybin/ \ | ||
&& mv /v2raybin/v2ray-v$VER-linux-64/geosite.dat /v2raybin/ \ | ||
&& chmod +x /v2raybin/v2ray \ | ||
&& rm -rf v2ray.zip \ | ||
&& rm -rf v2ray-v$VER-linux-64 \ | ||
&& chgrp -R 0 /v2raybin \ | ||
&& chmod -R g+rwX /v2raybin | ||
|
||
ADD entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
#ENTRYPOINT /entrypoint.sh | ||
|
||
CMD /entrypoint.sh | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cd /v2raybin | ||
echo -e -n "$CONFIG_JSON1" > config.json | ||
echo -e -n "$PORT" >> config.json | ||
echo -e -n "$CONFIG_JSON2" >> config.json | ||
echo -e -n "$UUID" >> config.json | ||
echo -e -n "$CONFIG_JSON3" >> config.json | ||
if [ "$CERT_PEM" != "$KEY_PEM" ]; then | ||
echo -e "$CERT_PEM" > cert.pem | ||
echo -e "$KEY_PEM" > key.pem | ||
fi | ||
./v2ray |