Add --userns flag to support Docker daemon that enables user namespace (#533)

I got an error like this after hitting `act` command.

> Error: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled

According to the document, when user namespaces are enabled on the Docker daemon,
neither host network mode and --privileged work without --userns=host. Since `act`
uses host network mode to match GitHub Actions runners, it cannot run jobs when
user namespaces are enabled. So I added the flag.

https://docs.docker.com/engine/security/userns-remap/#user-namespace-known-limitations

Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Hibariya
2021-02-28 01:31:25 +09:00
committed by GitHub
parent 6c118fe9ad
commit 8de7b956b7
7 changed files with 9 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ It will save that information to `~/.actrc`, please refer to [Configuration](#co
-r, --reuse reuse action containers to maintain state
-s, --secret stringArray secret to make available to actions with optional value (e.g. -s mysecret=foo or -s mysecret)
--secret-file string file with list of secrets to read from (e.g. --secret-file .secrets) (default ".secrets")
--userns string user namespace to use
-v, --verbose verbose output
--version version for act
-w, --watch watch the contents of the local repo and run when files change