Last active
May 14, 2019 07:20
-
-
Save benok/520ece006674896d6b52d6a15b22dbe0 to your computer and use it in GitHub Desktop.
check capability (useful checking inside docker container)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# how can a docker container check if it has a capability - Stack Overflow | |
# https://stackoverflow.com/questions/46702043/how-can-a-docker-container-check-if-it-has-a-capability | |
# need to install capsh (libcap2-bin for debian) | |
for i in $(capsh --print | grep "Current:" | cut -d ' ' -f3 | sed 's/,/ /g'); do | |
echo $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment