Created
May 12, 2018 17:24
-
-
Save dalguete/19a9d984e8a749eefaab7ec9aea6be01 to your computer and use it in GitHub Desktop.
Useful to extract the apparmor profile created by Docker when installed
This file contains hidden or 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/bash | |
[ "`echo "$@" | grep -e "docker"`" ] && echo "$@" | cut -c 5- | xargs -I {} cat {} > /tmp/apparmor-profile-docker-default | |
/sbin/apparmor_parser_original "$@" |
Worked on SLES 12.3, thanks a lot!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mine is
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
. Probably output in yours is a bit different, socut -c 5-
could not be cutting in the correct positions. I suggest you to just print the output of$@
in a file, as soon as Docker is installed so you can see info passed and order.