Back to articles
Spent 2 hours fixing Docker. The problem was one word in my config.
NewsDevOps

Spent 2 hours fixing Docker. The problem was one word in my config.

via Dev.to DevOpsNico Reyes

Spent 2 hours fixing Docker. The problem was one word in my config. Was setting up a new project yesterday with Docker Compose. Container kept crashing with zero helpful error messages. Just "exited with code 137". Searched Stack Overflow for an hour. Everyone said out of memory but my system had 16GB free. What I tried First thought it was the image. Rebuilt it 5 times with different base images. Alpine, debian, ubuntu. Still crashed. Then maybe volume mounts were broken. Changed paths, removed them entirely, added them back. Container still died at startup. Checked logs. Nothing useful: app-1 | exited with code 137 app-1 exited with code 137 Fun times. The actual problem After way too long staring at my compose file, found it. In the deploy section I had: deploy : resources : limits : cpus : ' 1.0' memory : 512M # This line Changed it to: deploy : resources : limits : cpus : ' 1.0' memory : 512m # lowercase 'm' Container started instantly. The problem was uppercase M vs lowercase m.

Continue reading on Dev.to DevOps

Opens in a new tab

Read Full Article
9 views

Related Articles