Unable to use oom-kill-disable configuration

I have the following docker compose file. When I run “docker-compose up”, I get > ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:

Unsupported config option for services.server: ‘oom-kill-disable’

I thought this feature was added in Add support for oom_kill_disable in service config · docker/compose@80503da · GitHub

I also tried using oom-kill-disable

version: “3”
services:
server:
build: .
ports:
- “5000:5000”
# - “5432:5432”
volumes:
- “.:/code”
environment:
- PORT=5000
network_mode: host
oom_kill_disable: true
deploy:
resources:
limits:
memory: 8G

I don’t think that option is available for the v3 format. You’ll have to use a v2 file if you want to take advantage of it.

1 Like

Thanks I saw it was introduced 2.x in
https://github.com/docker/compose/issues/2901 but no removal notice.
I guess there’s no Swarm/Kubernetes alternative, so Docker is not bothering with single-machine compose features?