mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 05:41:10 +08:00
优化Dockerfile使用
This commit is contained in:
23
docker_entrypoint.sh
Normal file
23
docker_entrypoint.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
var1=$1
|
||||
|
||||
#set -x
|
||||
|
||||
case $var1 in
|
||||
"bash" | "sh")
|
||||
echo $var1
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
"tool")
|
||||
/app/anylink "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
sysctl -w net.ipv4.ip_forward=1
|
||||
iptables -t nat -A POSTROUTING -s "${IPV4_CIDR}" -o eth0+ -j MASQUERADE
|
||||
# iptables -nL -t nat
|
||||
|
||||
/app/anylink "$@"
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user