From 80baa8d05418bcc18781f590a1a0bbbfde66276d Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Fri, 11 Mar 2022 07:01:11 -0600 Subject: [PATCH] feat: compatibility with self-hosted runners with SELinux When using a self-hosted runner with SELinux (fedora) volumes need to be mounted with ":z" in order to have write access these flags are documented [here](https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label) --- src/model/docker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/docker.ts b/src/model/docker.ts index 5d22f8a0..286fd265 100644 --- a/src/model/docker.ts +++ b/src/model/docker.ts @@ -45,10 +45,10 @@ class Docker { return `--env UNITY_SERIAL \ --env GITHUB_WORKSPACE=/github/workspace \ ${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \ - --volume "/var/run/docker.sock":"/var/run/docker.sock" \ - --volume "${runnerTemporaryPath}/_github_home":"/root" \ - --volume "${runnerTemporaryPath}/_github_workflow":"/github/workflow" \ - --volume "${workspace}":"/github/workspace" \ + --volume "/var/run/docker.sock":"/var/run/docker.sock:z" \ + --volume "${runnerTemporaryPath}/_github_home":"/root:z" \ + --volume "${runnerTemporaryPath}/_github_workflow":"/github/workflow:z" \ + --volume "${workspace}":"/github/workspace:z" \ ${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \ ${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''}`; case 'win32':