How to run a local or non-docker image using nektos/act?
Nektos act by default attempts to login to docker.io to pull a remote image, is it possible to use a locally cached image?
How to run a local or non-docker image using nektos/act?
Nektos act by default attempts to login to docker.io to pull a remote image, is it possible to use a locally cached image?
I ended up solving my problem, and so I'll post it with an answer.
The TLDR is
--pull=false
along with the-P
platform flag will allow you to use a local image.In my case I'm using a custom python image which was built locally called
python-3.10:latest
but you'd build your own local image usingdocker build . -f Dockerfile.python310 -t python-3.10:latest
To verify a local image use
docker image ls
, also you might need to make sure the architectures match (if the platform doesn't match, it won't find it, but it's probably fine if you're linux/amd64)I'll try to work through the steps:
to debug:
** make sure to use a very recent version of
gh
the github.com/cli/cli which supportsauth token
. You might need to replace your distro version which isn't updated as often!