Open jokaorgua opened 2 years ago
The issue seems to still be present. Any of my matrices fail on the same spot. I also tried using the github.workspace variable:
dockerRunArgs: |
--volume "${{ github.workspace }}:/work"
install: |
ls -lah /work
resulting in:
Run uraimo/run-on-arch-action@v2
Configuring Docker for multi-architecture support
/home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch.sh /home/runner/work/_actions/uraimo/run-on-arch-action/v2/Dockerfiles/Dockerfile.armv7.ubuntu_latest run-on-arch-dionysius-repo-job-armv7-ubuntu-latest --volume /home/runner/work/repo/repo:/work
Build container
...
/usr/bin/ls: cannot access '/work': No such file or directory
Is there an usage error on our side?
I've never had this problem in any of my projects. E.g. https://github.com/lh3/bwa/blob/139f68fc4c3747813783a488aef2adc86626b01b/.github/workflows/ci.yaml#L40-L45
Weird, yeah I can't figure out what I'm doing wrong.
Current workflow: https://github.com/dionysius/pyznap-deb/blob/gha_xcompile_archaction/.github/workflows/packaging.yml#L102 Results in: https://github.com/dionysius/pyznap-deb/actions/runs/3893904901
Job log extract:
Run uraimo/run-on-arch-action@v2
Configuring Docker for multi-architecture support
/home/runner/work/_actions/uraimo/run-on-arch-action/v2/src/run-on-arch.sh /home/runner/work/_actions/uraimo/run-on-arch-action/v2/Dockerfiles/Dockerfile.riscv64.ubuntu_latest run-on-arch-dionysius-pyznap-deb-deb-packaging-riscv64-ubuntu-latest --volume ${PWD}:/work
Build container
...
Step 3/3 : RUN chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh
Warning: rning] The requested image's platform (linux/riscv64) does not match the detected host platform (linux/amd64) and no specific platform was requested
---> Running in 5ed370177a65
total 60K
drwxr-xr-x 1 root root 4.0K Jan 11 14:49 .
drwxr-xr-x 1 root root 4.0K Jan 11 14:49 ..
-rwxr-xr-x 1 root root 0 Jan 11 14:49 .dockerenv
lrwxrwxrwx 1 root root 7 Nov 30 02:45 bin -> usr/bin
drwxr-xr-x 2 root root 4.0K Apr 18 2022 boot
drwxr-xr-x 5 root root 340 Jan 11 14:49 dev
drwxr-xr-x 1 root root 4.0K Jan 11 14:49 etc
drwxr-xr-x 2 root root 4.0K Apr 18 2022 home
lrwxrwxrwx 1 root root 7 Nov 30 02:45 lib -> usr/lib
drwxr-xr-x 2 root root 4.0K Nov 30 02:45 media
drwxr-xr-x 2 root root 4.0K Nov 30 02:45 mnt
drwxr-xr-x 2 root root 4.0K Nov 30 02:45 opt
dr-xr-xr-x 218 root root 0 Jan 11 14:49 proc
drwx------ 1 root root 4.0K Jan 11 14:49 root
drwxr-xr-x 5 root root 4.0K Nov 30 03:[57](https://github.com/dionysius/pyznap-deb/actions/runs/3893904901/jobs/6647149571#step:3:58) run <-- buggy line, ignore ^^
lrwxrwxrwx 1 root root 8 Nov 30 02:45 sbin -> usr/sbin
drwxr-xr-x 2 root root 4.0K Nov 30 02:45 srv
dr-xr-xr-x 12 root root 0 Jan 11 14:49 sys
drwxrwxrwt 2 root root 4.0K Nov 30 03:55 tmp
drwxr-xr-x 11 root root 4.0K Nov 30 02:45 usr
drwxr-xr-x 11 root root 4.0K Nov 30 03:55 var
/usr/bin/ls: cannot access '/work': No such file or directory
The command '/bin/sh -c chmod +x /root/run-on-arch-install.sh && /root/run-on-arch-install.sh' returned a non-zero code: 2
You try to use /work
at install
time. I always used it at run
time.
I guess this is by design since the argument name is dockerRunArgs
Yep, this is it! I think its more of a docker thing and I don't work with docker that often but it seems that the install
stage has the volume not yet mounted. Fixed for me.
Also at OP: @jokaorgua, move commands which use the mounted folder to run
.
Hi all and thanks, the conclusion is correct, install commands are executed in the first phase of the creation of the image while runArgs are only used when the container actually runs and executes the commands of the run section. In this case every use of /apps should be moved to the run section.
Hello.
Could anyone guide me how to mount current directory into the aarch64 container?
I'm trying to do that with
but the volume is not mounted
Here is my workflow