With docker_manifests enabled, how not to push docker image #2317
-
With the following docker and docker_manifests config, docker images I wonder how to only push image dockers:
- build_flag_templates:
- --platform=linux/386
- --pull
use_buildx: true
dockerfile: ./Dockerfile
image_templates:
- "username/myrepo:latest-386"
- build_flag_templates:
- --platform=linux/amd64
- --pull
use_buildx: true
dockerfile: ./Dockerfile
image_templates:
- "username/myrepo:latest-amd64"
- build_flag_templates:
- --platform=linux/arm64
- --pull
use_buildx: true
dockerfile: ./Dockerfile
image_templates:
- "username/myrepo:latest-arm64"
docker_manifests:
- name_template: "username/myrepo:latest"
image_templates:
- "username/myrepo:latest-386"
- "username/myrepo:latest-amd64"
- "username/myrepo:latest-arm64" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
afaik its not possible because the manifest tool needs the images to be pushed... you can try to create a manifest locally with unpushed images and it will fail as well... |
Beta Was this translation helpful? Give feedback.
-
AFAIK, run the following command will build and push multi-platform images to DockerHub without redundant images docker buildx build --platform linux/386,linux/amd64,linux/arm64 \
--output=registry \
--tag "username/myrepo:latest" \
--file Dockerfile . It seems Goreleaser doesn't support this. |
Beta Was this translation helpful? Give feedback.
-
This article showcases how to use GoReleaser without using it to push images. |
Beta Was this translation helpful? Give feedback.
afaik its not possible because the manifest tool needs the images to be pushed... you can try to create a manifest locally with unpushed images and it will fail as well...