Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dictionary.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Laven
rootlesskit
tunables
userns
25 changes: 25 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,31 @@ runs:
if: steps.rootless-docker.outputs.IN_USE != 'true'
run: sudo systemctl stop docker.service
shell: bash
- name: Check AppArmor version
id: apparmor
run: |
abi4_version="$(find /etc/apparmor.d/abi -maxdepth 1 -name '4.*' -printf '%f\n' | sort -nr | head -1)"
echo "ABI4_VERSION=$abi4_version" >>"$GITHUB_OUTPUT"
shell: bash
- name: Configure AppArmor
if: steps.rootless-docker.outputs.INSTALLED != 'true' && steps.apparmor.outputs.ABI4_VERSION != ''
env:
ABI4_VERSION: ${{ steps.apparmor.outputs.ABI4_VERSION }}
run: |
filename=$(echo $HOME/bin/rootlesskit | sed -e s@^/@@ -e s@/@.@g)
cat <<EOF > ~/${filename}
abi <abi/${ABI4_VERSION}>,
include <tunables/global>

"$HOME/bin/rootlesskit" flags=(unconfined) {
userns,

include if exists <local/${filename}>
}
EOF
sudo mv ~/${filename} /etc/apparmor.d/${filename}
sudo systemctl restart apparmor.service
shell: bash
- name: Install rootless Docker, start daemon, and wait until it's listening.
if: steps.rootless-docker.outputs.INSTALLED != 'true'
run: |
Expand Down