mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1633] Using -P platform with local image #811
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#811
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dannystaple on GitHub (Feb 18, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1633
Act version
0.2.42
Feature description
I would like to be able to use a local image for the
-Pflag.For example:
The intent would be to take the medium image and add other parts I might need, for example the python components if the intent is to test pipelines around the python ecosystem.
Currently running this, it will force pull from a remote on dockerhub, however, this may simply be a local image that I do not intend to put onto dockerhub.
@ChristopherHX commented on GitHub (Feb 18, 2023):
Use
--pull=false. The reason that this flag now defaults to true is a breaking change in act with older default docker images.You have to manually keep uptodate, if you use this flag.
@dannystaple commented on GitHub (Feb 18, 2023):
Worked a treat - just updating the docs to reflect that.
@joanrodriguez commented on GitHub (Feb 21, 2023):
Hey, the flag doesn't work for me if I never uploaded the image to Docker Hub....
Steps to reproduce:
Returns:
Error: Error response from daemon: pull access denied for foobar/docker-github-actions-runner, repository does not exist or may require 'docker login': denied: requested access to the resource is deniedDo I make a mistake with the flags or the feature doesn't exist?
@ChristopherHX commented on GitHub (Feb 21, 2023):
I cannot reproduce your error.
You should see forcePull=false in the log and if act finds you image it will use it.
forcePull=true will always pull the image (--pull)
forcePull=false will pull the image if missing (--pull=false)
@dannystaple commented on GitHub (Feb 21, 2023):
@joanrodriguez I take it the line continuation characters are not posted just for aesthetics or that this was all on one line?
Can you show the docker image in docker list. It isn't looking for a local arm64 image when you have a x86 image is it?
@joanrodriguez commented on GitHub (Feb 22, 2023):
Hey guys, I had some conflicting stuff in my
.~/.actrc. After emptying it and removing the architecture arg, I'm able to use a local docker image :)You can't really tell that it didn't pull it from the logs but it was instantaneous and I had deleted the Docker image from the hub so it definitely worked :)
Thanks again
@thomashutcheson-msm commented on GitHub (Feb 27, 2023):
I was getting this error too, then realised I needed to add the tag as well as repository name.
my-self-hosted-image:v1now I can run
act -j my_github_workflow -P self-hosted=my-self-hosted-image:v1 --pull=false@dgrebb commented on GitHub (Jun 19, 2023):
The only question that wasn't answered here, which ended up being the issue for me:
act --container-architecture linux/amd64 --pull=false -P ubuntu-latest=custom-image-name:latest ...This will look for that image in the specific architecture.
If your custom image wasn't build with that architecture,
actwill then attempt to pull an image from the registry, even with the--pull=falseflag set.@dannystaple this issue and your subsequent comment saved me days of banging my head against a wall. Thank you!
I needed to
docker buildx build --platform linux/amd64my custom image.@surgiie commented on GitHub (Aug 7, 2024):
--pull=falsedoesnt work with me.Im building image with
--platform linux/amd64as suggested above but its still trying to pull.Im also able to run a container with said image:
docker run -it self-hosted-workers-prod:latest /bin/bashFeels like my flag is being ignored. Using act version :
0.2.65Any one have the same issue?