Add option to remove container when action is done
@chrmarti 已经在做这个了。
开始于 2024年3月26日。
评估
这个 Issue 还没有评估数据。
描述
Hi, I'm getting the following error when Github actions is trying to start a container and run commands. I have a simple workflow file, running on a self hosted runner.
name: run-tests
run-name: ${{ github.actor }} is running
on:
push:
# Sequence of patterns matched against refs/heads
branches:
- develop
workflow_dispatch:
env:
ARCH: amd64
jobs:
run-tests:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Build and run dev container task
uses: devcontainers/[email protected]
with:
# ci.sh script builds and runs all unit tests
runCmd: chmod +x ./ci.sh && ./ci.sh
env:
ARCH: amd64
Github actions can build the dev container, but fails at the "run command in container" step of the "Build and run dev container" task.
🚀 Run command in container
About to run devcontainer exec --workspace-folder /home/me/actions-runner/_work/my_repo --remote-env GITHUB_OUTPUT=/mnt/github/output --remote-env GITHUB_ENV=/mnt/github/env --remote-env GITHUB_PATH=/mnt/github/path --remote-env GITHUB_STEP_SUMMARY=/mnt/github/step-summary bash -c chmod +x ./ci.sh && ./ci.sh
OCI runtime exec failed: exec failed: unable to start container process: current working directory is outside of container mount namespace root -- possible container breakout detected: unknown
Error: Dev container exec failed: (exit code: 126)
Error: Dev container exec failed: (exit code: 126)
I'm not sure exactly where this is originating from. If I cd to /home/me/actions-runner/_work/my_repo and do devcontainer exec --workspace-folder . I get the same error msg:
OCI runtime exec failed: exec failed: unable to start container process: current working directory is outside of container mount namespace root -- possible container breakout detected: unknown
- 主要语言
- TypeScript
- 星标
- 499
- 派生
- 101
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
devcontainers/ci 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
devcontainers/ci#446 ·
-
难度 3/5 1-2 天 新手友好度 55/100
devcontainers/ci#445 ·
-
难度 4/5 3-5 天 新手友好度 45/100
devcontainers/ci#444 · 2 条评论 · 3 个 reaction ·
-
Inputs are wrong in post step when action is called through a nested composite action可能已有人在做 @v-Kaniska244 于 65 天前认领。 未关闭
devcontainers/ci#442 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 45/100
devcontainers/ci#437 ·
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
supadata-ai/mcp#27 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
capricorn86/happy-dom#2485 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
siyuan-note/siyuan#20430 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
Albert-Weasker/niubigeo#194 ·
维护者通常 1 天内回复