We're running a docker container on AWS Beanstalk and on the Docker platform; 'Docker running on 64bit Amazon Linux 2' Have followed these guides to setup a swap-partition that is visible when running the command 'swapon'.
Guides:
http://steinn.org/post/elasticbeanstalk-swap/
https://gist.github.com/steinnes/1f8a1b44fed4b136005f
When the docker instance is running and using all available memory, the process is immediately killed. No swap-space is being utilized.
Have also tried experimenting with various settings in the docker-compose.yml, but nothing seems to be working.
mem_limit: 16g (or omitting this setting)
mem_reservation: 8g (or omitting this setting)
memswap_limit: 48g or -1
mem_swappiness: 0
privileged: true (tried this only to rule out that it had something to do with access rights)
I'm dead in the water on this one. Have any of you practical experience with creating swap partitions on Beanstalk Docker and actually verifying that the swap-space can be utilized by the container?