diff --git a/Dockerfile b/Dockerfile index f4478e2..f809ac2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # this will pull lastest version # https://hub.docker.com/r/openresty/openresty/tags?page=1&name=centos # FROM openresty/openresty:centos -# FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7 +# FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7-amd64 FROM --platform=linux/amd64 openresty/openresty:1.21.4.1-4-centos7 # not ENV TZ "Asia/Shanghai" diff --git a/bin/ngxway b/bin/ngxway index ab5089b..5ddccc2 100755 --- a/bin/ngxway +++ b/bin/ngxway @@ -48,9 +48,6 @@ function start(){ docker run --ulimit nofile=$softNoFile:$hardNoFile \ --sysctl net.ipv4.ip_local_port_range="$ipLocalPortRange" \ --sysctl net.core.somaxconn="$soMaxConn" \ - --sysctl net.ipv4.tcp_tw_reuse="$tcpTWReuse" \ - --sysctl net.ipv4.tcp_max_tw_buckets="$tcpMaxTWBuckets" \ - --sysctl net.ipv4.tcp_syncookies="$tcpSyncookies" \ --cpus=$maxNCPU \ --name ngxwayContainer -d -p $ngxwayAddr:8090 -p 8000:8000 -v $localVolumeLogsDir:/dist/logs/ ngxway if [ $? -ne 0 ]; then @@ -59,6 +56,8 @@ function start(){ fi elif [ $dockerNetwork == "host" ]; then docker run --ulimit nofile=$softNoFile:$hardNoFile \ + --sysctl net.ipv4.ip_local_port_range="$ipLocalPortRange" \ + --sysctl net.core.somaxconn="$soMaxConn" \ --cpus=$maxNCPU \ --name ngxwayContainer -d --net=host -v $localVolumeLogsDir:/dist/logs/ ngxway if [ $? -ne 0 ]; then diff --git a/ngxway.conf b/ngxway.conf index c8738ec..0eb3d77 100644 --- a/ngxway.conf +++ b/ngxway.conf @@ -15,10 +15,10 @@ max_ncpu=8 # The network option of docker.[bridge/host] docker_network=host # The linux system params in docker. -tcp_syncookies=0 -tcp_max_tw_buckets=700 -tcp_tw_reuse=1 somaxconn=262155 ip_local_port_range=1024 65535 soft_nofile=1048576 hard_nofile=1048576 +tcp_syncookies=0 # Deprecated +tcp_max_tw_buckets=700 # Deprecated +tcp_tw_reuse=1 # Deprecated