Closed igorluppi closed 1 year ago
I wanted the action to just push the image I already have build. Isnt possible?
No, but like https://github.com/docker/build-push-action/issues/538 you can just have a step pushing your image.
I feel like it takes to long to build-and-push while it uses
Run docker/setup-buildx-action@v2
and the building step fromRun docker/build-push-action@v2
.
Do you have a repro?
If I locally build using
docker build . --file Dockerfile --tag $IMAGE_NAME
it takes no longer than a minute (using the docker default cache).
Maybe it's using cache from your local state and in your workflow you might not use any remote cache I guess.
What would be your suggestion @crazy-max ? I will wait until the first push finish and try again, I'm using gha cache.
But using the local build (without this action), it takes <1min (most steps have been skipped due docker cache). and pushing with another step (without this action) it takes more 3 minutes.
Which cache should I use to get a similar timing using the build-push-action? The local cache?
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
Please post a full repro, I can't tell without it.
No, but like https://github.com/docker/build-push-action/issues/538 you can just have a step pushing your image.
In this case you should tag your image yourself which is not very trivial... Wouldn't it be better if the action supported skipping build?
I'm not sure why this was closed as completed. Could this issue or #538 be reopened? It seems like the ability to push without building is a common use case.
@crazy-max Is this possible, please?
I feel like it takes to long to build-and-push while it uses
Run docker/setup-buildx-action@v2
and the building step fromRun docker/build-push-action@v2
. If I locally build usingdocker build . --file Dockerfile --tag $IMAGE_NAME
it takes no longer than a minute (using the docker default cache).Or something it odd with the build cache step, because it takes a long time. I wanted the action to just push the image I already have build. Isnt possible?