Title: SELinux: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock · Issue #9 · myoung34/docker-github-actions-runner · GitHub
Open Graph Title: SELinux: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock · Issue #9 · myoung34/docker-github-actions-runner
X Title: SELinux: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock · Issue #9 · myoung34/docker-github-actions-runner
Description: Putting this here for others. In the runner: root@50a4dc272487:/actions-runner# docker ps Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http:///var/run/docker.sock/v1....
Open Graph Description: Putting this here for others. In the runner: root@50a4dc272487:/actions-runner# docker ps Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: G...
X Description: Putting this here for others. In the runner: root@50a4dc272487:/actions-runner# docker ps Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: G...
Opengraph URL: https://github.com/myoung34/docker-github-actions-runner/issues/9
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SELinux: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock","articleBody":"Putting this here for others.\r\n\r\n**In the runner:**\r\n```shell\r\nroot@50a4dc272487:/actions-runner# docker ps\r\nGot permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied\r\n```\r\n\r\n**On the host:**\r\n```shell\r\n----\r\ntime-\u003eSat Mar 7 21:21:39 2020\r\ntype=PROCTITLE msg=audit(1583616099.890:863): proctitle=646F636B6572007073\r\ntype=SYSCALL msg=audit(1583616099.890:863): arch=c000003e syscall=42 success=no exit=-13 a0=3 a1=c00056f290 a2=17 a3=0 items=0 ppid=3254 pid=3267 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=4294967295 comm=\"docker\" exe=\"/usr/bin/docker\" subj=system_u:system_r:container_t:s0:c36,c702 key=(null)\r\ntype=AVC msg=audit(1583616099.890:863): avc: denied { connectto } for pid=3267 comm=\"docker\" path=\"/run/docker.sock\" scontext=system_u:system_r:container_t:s0:c36,c702 tcontext=system_u:system_r:container_runtime_t:s0 tclass=unix_stream_socket permissive=0\r\n```\r\n\r\nIf you're running the default Docker package from Centos or RH it doesn't disable SELinux at the daemon. Start the container with `--security-opt=label=disable`.\r\n\r\n```shell\r\nfunction github-runner {\r\n name=github-runner-${1//\\//-}\r\n org=$(dirname $1)\r\n repo=$(basename $1)\r\n tag=${3:-latest}\r\n docker rm -f $name\r\n docker run -d --restart=always \\\r\n --security-opt=label=disable \\\r\n -e REPO_URL=\"https://github.com/${org}/${repo}\" \\\r\n -e RUNNER_TOKEN=\"$2\" \\\r\n -e RUNNER_NAME=\"linux-${repo}\" \\\r\n -e RUNNER_WORKDIR=\"/tmp/github-runner\" \\\r\n -v /var/run/docker.sock:/var/run/docker.sock \\\r\n -v /tmp/github-runner:/tmp/github-runner \\\r\n --name=$name myoung34/github-runner:${tag}\r\n}\r\n```\r\n\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1669728","author":{"url":"https://github.com/rbellamy","@type":"Person","name":"rbellamy"},"datePublished":"2020-03-07T21:50:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/9/docker-github-actions-runner/issues/9"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5c17a91e-00c7-24d0-d970-b9cf18d51af4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB50:1032C3:1F9E062:2AD91C1:6A655730 |
| html-safe-nonce | 28310fe19affdaf595b69a18224102b5d99301fec5e727b19e037f6ae3fd8440 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjUwOjEwMzJDMzoxRjlFMDYyOjJBRDkxQzE6NkE2NTU3MzAiLCJ2aXNpdG9yX2lkIjoiMjIwODc3NDg3MzIwODQxMTk1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 27ff0a6b80919180bd54a21628b7b974a39a0ca15a565f77fbf1c08d5b8b8a00 |
| hovercard-subject-tag | issue:577405923 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/myoung34/docker-github-actions-runner/9/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54b9216660b385327e67b73d1c477a11ce621d94678e0cfbb39fae8b99364b0d/myoung34/docker-github-actions-runner/issues/9 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54b9216660b385327e67b73d1c477a11ce621d94678e0cfbb39fae8b99364b0d/myoung34/docker-github-actions-runner/issues/9 |
| og:image:alt | Putting this here for others. In the runner: root@50a4dc272487:/actions-runner# docker ps Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: G... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rbellamy |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| turbo-cache-control | no-preview |
| go-import | github.com/myoung34/docker-github-actions-runner git https://github.com/myoung34/docker-github-actions-runner.git |
| octolytics-dimension-user_id | 879922 |
| octolytics-dimension-user_login | myoung34 |
| octolytics-dimension-repository_id | 223951404 |
| octolytics-dimension-repository_nwo | myoung34/docker-github-actions-runner |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 223951404 |
| octolytics-dimension-repository_network_root_nwo | myoung34/docker-github-actions-runner |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width