Configuring CAP_IPC_LOCK and CAP_SYS_NICE Capabilities in Docker
Learn how to resolve Docker capability warnings for `CAP_IPC_LOCK` and `CAP_SYS_NICE` when running ClickHouse in a container.
Question
When running ClickHouse in Docker, Docker is complaining about the lack of CAP_IPC_LOCK and CAP_SYS_NICE capabilities in the system. How can I resolve it?
Here is what the no CAP_SYS_NICE or CAP_SYS_NICE capability log messages look like:
Answer
- Add two 
--cap-addarguments to provide the container with theIPC_LOCKandSYS_NICEcapabilities: 
- Check that the capabilities are visible in the container using the following command:
 
The response is similar to:
- Manually set both the capabilities for ClickHouse
 
- Check that the capabilities are applied.
 
You should see the following:
- Restart the ClickHouse server and the log messages should not be shown.
 
Check out this article on Linux capabilities for more details.
 · 2 мин. чтения