Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add option to remove container when action is done

Đang mở
#285 5 bình luận 0 reaction 1 người được giao Xem trên GitHub

@chrmarti đang làm issue này rồi.

Từ ngày 26/3/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

feature

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

Ngôn ngữ chính
TypeScript
Star
499
Fork
101
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của devcontainers/ci

Tất cả issue của devcontainers/ci

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.