Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Add option to remove container when action is done

Offen
#285 5 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@chrmarti arbeitet bereits daran.

Seit 26.3.2024.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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

Vorherrschende Sprache
TypeScript
Sterne
499
Forks
101
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus devcontainers/ci

Alle Issues in devcontainers/ci

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.