[GH-ISSUE #895] Nested container issue #529

Closed
opened 2026-03-01 21:44:12 +03:00 by kerem · 2 comments
Owner

Originally created by @dreibh on GitHub (Nov 20, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/895

I am trying to use the uraimo/run-on-arch-action action (https://github.com/uraimo/run-on-arch-action), which runs an additional container to usually run the build with another architecture (using QEMU). This is working in GitHub, but failing with act, due to different behaviour. This issue may be related to https://github.com/nektos/act/issues/732.

Workflow:

...
jobs:
  run-on-arch-buster-aarch64:
    runs-on: ubuntu-latest
    name: Debian Buster on ARMv8
    steps:
      - uses: actions/checkout@v2
      - uses: uraimo/run-on-arch-action@v2.1.1
        name: Run commands
        id: build
        with:
          arch: aarch64
          distro: buster
          shell: /bin/bash
          install: |
            uname -a
            apt-get update -q
            apt-get install -y gcc python3
          run: |
            uname -a

Expected behaviour with act -v -j run-on-arch-buster-aarch64:
Sucessfully preparing the container, then running the installation steps and finally printing some information (here: uname -a).

In GitHub, this is successful.

Act fails:
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/run/act/actions/uraimo-run-on-arch-action@v2.1.1/src/run-on-arch-commands.sh": stat /run/act/actions/uraimo-run-on-arch-action@v2.1.1/src/run-on-arch-commands.sh: no such file or directory: unknown.
The issue is that a file "run-on-arch-commands.sh" is not found, which should be in a volume mounted into the container. But the directory is empty.

I did some investigations:

  1. On the host machine, act seems to create the directories of the hierarchy:
nornetpp@dubbo:/var/run/act$ tree
.
├── actions
│   ├── dreibh-run-on-arch-action@dreibh-tests
│   └── uraimo-run-on-arch-action@v2.1.1
└── workflow

4 directories, 0 files
nornetpp@dubbo:/var/run/act$ tree
.
├── actions
│   ├── dreibh-run-on-arch-action@dreibh-tests
│   └── uraimo-run-on-arch-action@v2.1.1
└── workflow

4 directories, 0 files
  1. The container created by act is instantiated, initialised and runs the scripts to prepare the files:
root@dubbo:~# tree /var/run/act/     
/var/run/act/
|-- actions
|   `-- uraimo-run-on-arch-action@v2.1.1
|       |-- Dockerfiles
|       |   |-- Dockerfile.aarch64.alpine_latest
|       |   |-- Dockerfile.aarch64.archarm_latest
|       |   |-- Dockerfile.aarch64.bullseye
|       |   |-- Dockerfile.aarch64.buster
...
|       |   `-- run-on-arch-install.sh
...
|       |-- package-lock.json
|       |-- package.json
|       `-- src
|           |-- run-on-arch-commands.sh
|           |-- run-on-arch-setup.sh
|           |-- run-on-arch.js
|           `-- run-on-arch.sh
`-- workflow
    |-- envs.txt
    |-- event.json
    `-- paths.txt
  1. On the host machine, the directory hierarchy is the same as before, i.e. a few directories but no files! That is:
nornetpp@dubbo:/var/run/act$ tree
.
├── actions
│   ├── dreibh-run-on-arch-action@dreibh-tests
│   └── uraimo-run-on-arch-action@v2.1.1
└── workflow

4 directories, 0 files
  1. The run-on-arch action is not starting a container inside the ACT container. It tries to provide some directories of the hierarchy above as volumes into the new container.

  2. However, instead of getting the files of part 2 (i.e. from the ACT container) into the new container, it seems to get the file hierarchy from the host machine. That is, inside the container created by run-on-arch:

root@0c43f55cceb6:/home/nornetpp/src/tsctp# uname -a
Linux 0c43f55cceb6 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 aarch64 GNU/Linux
root@0c43f55cceb6:/home/nornetpp/src/tsctp# ls -lR /var/run/act/
/var/run/act/:
total 0
drwxr-xr-x 1 root root 76 Nov 20 16:55 actions
drwxr-xr-x 2 root root 40 Nov 20 15:23 workflow

/var/run/act/actions:
total 0
drwxr-xr-x 2 root root 40 Nov 20 15:23 dreibh-run-on-arch-action@dreibh-tests

/var/run/act/actions/dreibh-run-on-arch-action@dreibh-tests:
total 0

/var/run/act/workflow:
total 0

That is, the run-on-arch container got the volumes from the host machine, but not -- as expected -- from the act container.

So, something in act is different from the GitHub behaviour. May be the container created by act has to be specially configured to handle the nested containerisation correctly?

Originally created by @dreibh on GitHub (Nov 20, 2021). Original GitHub issue: https://github.com/nektos/act/issues/895 I am trying to use the uraimo/run-on-arch-action action (https://github.com/uraimo/run-on-arch-action), which runs an additional container to usually run the build with another architecture (using QEMU). This is working in GitHub, but failing with act, due to different behaviour. This issue may be related to https://github.com/nektos/act/issues/732. Workflow: ``` ... jobs: run-on-arch-buster-aarch64: runs-on: ubuntu-latest name: Debian Buster on ARMv8 steps: - uses: actions/checkout@v2 - uses: uraimo/run-on-arch-action@v2.1.1 name: Run commands id: build with: arch: aarch64 distro: buster shell: /bin/bash install: | uname -a apt-get update -q apt-get install -y gcc python3 run: | uname -a ``` Expected behaviour with act -v -j run-on-arch-buster-aarch64: Sucessfully preparing the container, then running the installation steps and finally printing some information (here: uname -a). In GitHub, this is successful. Act fails: ` docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/run/act/actions/uraimo-run-on-arch-action@v2.1.1/src/run-on-arch-commands.sh": stat /run/act/actions/uraimo-run-on-arch-action@v2.1.1/src/run-on-arch-commands.sh: no such file or directory: unknown. ` The issue is that a file "run-on-arch-commands.sh" is not found, which **should** be in a volume mounted into the container. But the directory is empty. I did some investigations: 1. On the host machine, act seems to create the directories of the hierarchy: ``` nornetpp@dubbo:/var/run/act$ tree . ├── actions │   ├── dreibh-run-on-arch-action@dreibh-tests │   └── uraimo-run-on-arch-action@v2.1.1 └── workflow 4 directories, 0 files nornetpp@dubbo:/var/run/act$ tree . ├── actions │   ├── dreibh-run-on-arch-action@dreibh-tests │   └── uraimo-run-on-arch-action@v2.1.1 └── workflow 4 directories, 0 files ``` 2. The container created by act is instantiated, initialised and runs the scripts to prepare the files: ``` root@dubbo:~# tree /var/run/act/ /var/run/act/ |-- actions | `-- uraimo-run-on-arch-action@v2.1.1 | |-- Dockerfiles | | |-- Dockerfile.aarch64.alpine_latest | | |-- Dockerfile.aarch64.archarm_latest | | |-- Dockerfile.aarch64.bullseye | | |-- Dockerfile.aarch64.buster ... | | `-- run-on-arch-install.sh ... | |-- package-lock.json | |-- package.json | `-- src | |-- run-on-arch-commands.sh | |-- run-on-arch-setup.sh | |-- run-on-arch.js | `-- run-on-arch.sh `-- workflow |-- envs.txt |-- event.json `-- paths.txt ``` 3. On the host machine, the directory hierarchy is **the same as before**, i.e. a few directories but no files! That is: ``` nornetpp@dubbo:/var/run/act$ tree . ├── actions │   ├── dreibh-run-on-arch-action@dreibh-tests │   └── uraimo-run-on-arch-action@v2.1.1 └── workflow 4 directories, 0 files ``` 4. The run-on-arch action is not starting a container inside the ACT container. It tries to provide some directories of the hierarchy above as volumes into the new container. 5. However, instead of getting the files of part 2 (i.e. from the ACT container) into the new container, it seems to get the file hierarchy from the host machine. That is, inside the container created by run-on-arch: ``` root@0c43f55cceb6:/home/nornetpp/src/tsctp# uname -a Linux 0c43f55cceb6 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 aarch64 GNU/Linux root@0c43f55cceb6:/home/nornetpp/src/tsctp# ls -lR /var/run/act/ /var/run/act/: total 0 drwxr-xr-x 1 root root 76 Nov 20 16:55 actions drwxr-xr-x 2 root root 40 Nov 20 15:23 workflow /var/run/act/actions: total 0 drwxr-xr-x 2 root root 40 Nov 20 15:23 dreibh-run-on-arch-action@dreibh-tests /var/run/act/actions/dreibh-run-on-arch-action@dreibh-tests: total 0 /var/run/act/workflow: total 0 ``` That is, the run-on-arch container got the volumes from the host machine, but not -- as expected -- from the act container. So, something in act is different from the GitHub behaviour. May be the container created by act has to be specially configured to handle the nested containerisation correctly?
kerem 2026-03-01 21:44:12 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 21, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:998360417 --> @github-actions[bot] commented on GitHub (Dec 21, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@renaudguerin commented on GitHub (May 24, 2024):

I have a very similar issue. Was this ever resolved ?

<!-- gh-comment-id:2129937254 --> @renaudguerin commented on GitHub (May 24, 2024): I have a very similar issue. Was this ever resolved ?
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#529
No description provided.