I am running a 3 node swarm cluster and trying to launch services with
docker stack deploy
Below is my compose file
services:
nginx:
image: nginx:latest
networks:
- til-prod-network
volumes:
- type: bind
source: /tmp/nginx/nginx.conf
target: /etc/nginx/nginx.conf
ports:
- 83:80
depends_on:
- BLUE
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
resources:
reservations:
memory: 4096M
limits:
memory: 4096M
BLUE:
image: dtr.xxx.xxx/cmdb:v1.26
sysctls:
net.core.somaxconn: 4096
networks:
- til-prod-network
deploy:
replicas: 2
update_config:
parallelism: 1
delay: 10s
placement:
constraints:
- node.role == worker
resources:
reservations:
memory: 2048M
limits:
memory: 2048M
networks:
til-prod-network:
external: true
But when i deploy this via docker stack deploy, it gives me error of "Unsupported option sysctls".
Docker docs says same.
What solution should i implement to modify sysctl inside containers when running in swarm mode.