memsql / memsql-docker-quickstart

A docker image for testing MemSQL + MemSQL Ops
Apache License 2.0
67 stars 23 forks source link

Add required sysctl settings to dockerfile and load in entrypoint #14

Closed abale closed 7 years ago

abale commented 7 years ago

Some settings are required in sysctl.conf in order for the container to run without issues.

in dockerfile, write /etc/sysctl.conf with:

net.core.somaxconn=1024
vm.min_free_kbytes=2639550

in memsql-entrypoint.sh, add:

#!/bin/bash
set -e
sysctl -p
abale commented 7 years ago

Actually, this isn't a valid workaround. The /proc system in the container is locked.

I suggest instead updating the readme to add:

docker run -d --sysctl net.core.somaxconn=1024 --sysctl vm.min_free_kbytes=2639550 -p 3306:3306 -p 9000:9000 -v memsql:/memsql --name=memsql memsql/quickstart

carlsverre commented 7 years ago

Some users may not be able to set those sysctls - but I like the idea. I will update the readme to include a note about that.

carlsverre commented 7 years ago

Fixed in 9a90f05f4924a46ef9625b385e6b499f422fc089