[PR #533] [MERGED] Add --userns flag to support Docker daemon that enables user namespace #1488

Closed
opened 2026-03-01 21:51:24 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/533
Author: @hibariya
Created: 2/16/2021
Status: Merged
Merged: 2/27/2021
Merged by: @cplee

Base: masterHead: userns


📝 Commits (3)

  • ad44892 Add --userns flag to support Docker daemon that enables user namespace
  • eeaa7f1 Merge branch 'master' into userns
  • c8146dc Merge branch 'master' into userns

📊 Changes

7 files changed (+9 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)
📝 cmd/input.go (+1 -0)
📝 cmd/root.go (+2 -0)
📝 pkg/container/docker_run.go (+2 -0)
📝 pkg/runner/run_context.go (+1 -0)
📝 pkg/runner/runner.go (+1 -0)
📝 pkg/runner/step_context.go (+1 -0)

📄 Description

Hello. 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 (link), 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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/533 **Author:** [@hibariya](https://github.com/hibariya) **Created:** 2/16/2021 **Status:** ✅ Merged **Merged:** 2/27/2021 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `userns` --- ### 📝 Commits (3) - [`ad44892`](https://github.com/nektos/act/commit/ad4489241aa1bf0fdc442791cd6ac5074ccea86d) Add --userns flag to support Docker daemon that enables user namespace - [`eeaa7f1`](https://github.com/nektos/act/commit/eeaa7f18b5a3a0ca7003a8831462dbe28e9efadf) Merge branch 'master' into userns - [`c8146dc`](https://github.com/nektos/act/commit/c8146dc03d48d87c1a898fa76ace422b0ebafe35) Merge branch 'master' into userns ### 📊 Changes **7 files changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `cmd/input.go` (+1 -0) 📝 `cmd/root.go` (+2 -0) 📝 `pkg/container/docker_run.go` (+2 -0) 📝 `pkg/runner/run_context.go` (+1 -0) 📝 `pkg/runner/runner.go` (+1 -0) 📝 `pkg/runner/step_context.go` (+1 -0) </details> ### 📄 Description Hello. 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 ([link](https://docs.docker.com/engine/security/userns-remap/#user-namespace-known-limitations)), 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:24 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1488
No description provided.