Skip to content

Commit be8bdb9

Browse files
committed
fix build on ubuntu
1 parent 903c39f commit be8bdb9

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ jobs:
5151
go-version-file: go.mod
5252
cache: true
5353

54+
- name: Allow Linux unprivileged user namespaces
55+
if: runner.os == 'Linux'
56+
shell: bash
57+
run: |
58+
set -euo pipefail
59+
if [[ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]]; then
60+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
61+
else
62+
echo "kernel.apparmor_restrict_unprivileged_userns is not present; skipping"
63+
fi
64+
5465
- name: Check Linux rootfs prerequisites
5566
if: runner.os == 'Linux'
5667
shell: bash

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ jobs:
5757
go-version-file: go.mod
5858
cache: true
5959

60+
- name: Allow Linux unprivileged user namespaces
61+
if: runner.os == 'Linux'
62+
shell: bash
63+
run: |
64+
set -euo pipefail
65+
if [[ -e /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]]; then
66+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
67+
else
68+
echo "kernel.apparmor_restrict_unprivileged_userns is not present; skipping"
69+
fi
70+
6071
- name: Check Linux rootfs prerequisites
6172
if: runner.os == 'Linux'
6273
shell: bash

0 commit comments

Comments
 (0)