-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mounting volumes into docker not working #410
Comments
I've just ran into this problem as well although slightly differently I think my workaround will work for anyone encountering it in future. Cause Workaround Since the image mounts This command works for running act (note I'm using the 16GB image that matches Github exactly, you may not want to do this!) act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --bind --directory /github/workspace You can also run it without the --directory flag (but with --bind) if you are in /github/workspace I use this one liner to make it easier, when run from the root of the repo it deletes the existing workspace (to clear out any changes/build artefacts etc) and then copies over the current directory before running act. sudo rm -r /github/workspace/ && cp -r ./ /github/workspace && act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 --bind --directory /github/workspace Known Limitations Suggested long term fix |
Issue is stale and will be closed in 14 days unless there is new activity |
If inside the job a volume is mounted into a docker container the mounted folder will be empty in this container.
I create a minimal example
In gh actions this works fine: See https://github.com/agutenkunst/nectos-act-docker-volume-mount-issue/runs/1368072778#step:2:20 ("file" is printed by /bin/ls)
Running locally
does not give any output, indicating a failed mount.
This is also what I observed in a more complex real world use case. I am not sure if the image is actually Docker-in-Docker ready. Creating docker containers seems to work fine. Just not mounting something into them.
I check also on github and it seems that the runner user itself is "docker". Sounds like something according to https://docs.docker.com/engine/install/linux-postinstall/ is missing, but I am not sure.
The text was updated successfully, but these errors were encountered: