docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.59k stars 483 forks source link

ERROR exporting to image #1231

Closed talesam closed 2 years ago

talesam commented 2 years ago

Can anyone help me about this error?

=> [linux/arm/v7 2/6] WORKDIR /bot                                                                                                                      8.1s
 => [linux/arm64 2/6] WORKDIR /bot                                                                                                                       5.3s
 => [linux/arm/v7 3/6] RUN apk update &&     apk add --no-cache     git zip unzip p7zip                                                                 13.2s
 => [linux/386 2/6] WORKDIR /bot                                                                                                                         4.0s
 => [linux/amd64 2/6] WORKDIR /bot                                                                                                                       4.5s
 => [linux/arm64 3/6] RUN apk update &&     apk add --no-cache     git zip unzip p7zip                                                                  15.9s
 => [linux/ppc64le 2/6] WORKDIR /bot                                                                                                                     3.9s
 => [linux/386 3/6] RUN apk update &&     apk add --no-cache     git zip unzip p7zip                                                                     9.5s
 => [linux/amd64 3/6] RUN apk update &&     apk add --no-cache     git zip unzip p7zip                                                                   9.1s
 => [linux/ppc64le 3/6] RUN apk update &&     apk add --no-cache     git zip unzip p7zip                                                                11.5s
 => [linux/arm/v7 4/6] RUN git clone https://github.com/ogioncz/flarum-webhooks-telegram-bridge.git /bot                                                 4.0s
 => [linux/386 4/6] RUN git clone https://github.com/ogioncz/flarum-webhooks-telegram-bridge.git /bot                                                    5.0s
 => [linux/amd64 4/6] RUN git clone https://github.com/ogioncz/flarum-webhooks-telegram-bridge.git /bot                                                  6.0s
 => [linux/arm/v7 5/6] RUN cd /bot && curl -sS https://getcomposer.org/installer | php --     --install-dir=/usr/bin --filename=composer && composer i  22.2s
 => [linux/arm64 4/6] RUN git clone https://github.com/ogioncz/flarum-webhooks-telegram-bridge.git /bot                                                  6.6s
 => [linux/386 5/6] RUN cd /bot && curl -sS https://getcomposer.org/installer | php --     --install-dir=/usr/bin --filename=composer && composer inst  22.0s
 => [linux/ppc64le 4/6] RUN git clone https://github.com/ogioncz/flarum-webhooks-telegram-bridge.git /bot                                                6.1s
 => [linux/amd64 5/6] RUN cd /bot && curl -sS https://getcomposer.org/installer | php --     --install-dir=/usr/bin --filename=composer && composer in  19.4s
 => [linux/arm64 5/6] RUN cd /bot && curl -sS https://getcomposer.org/installer | php --     --install-dir=/usr/bin --filename=composer && composer in  18.4s
 => [linux/ppc64le 5/6] RUN cd /bot && curl -sS https://getcomposer.org/installer | php --     --install-dir=/usr/bin --filename=composer && composer   32.0s
 => [linux/arm/v7 6/6] COPY config.php /bot/                                                                                                             1.7s
 => [linux/amd64 6/6] COPY config.php /bot/                                                                                                              4.1s
 => [linux/386 6/6] COPY config.php /bot/                                                                                                                4.5s
 => [linux/arm64 6/6] COPY config.php /bot/                                                                                                              2.8s
 => [linux/ppc64le 6/6] COPY config.php /bot/                                                                                                            1.7s
 => ERROR exporting to image                                                                                                                             0.2s
------
 > exporting to image:
------
error: failed to solve: number of platforms does not match references 6 5

image

Executed commands:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx rm builder
docker buildx create --name builder --driver docker-container --use
docker buildx inspect --bootstrap
docker buildx build \
--push \
--platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/386,linux \
--tag talesam/flarum-webhooks-telegram-bridge:latest .
crazy-max commented 2 years ago

--platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/386,linux \

Looks like a typo: ,linux. should be removed.

talesam commented 2 years ago

--platform linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/386,linux \

This?

--platform linux/arm/v7/arm64/v8/amd64/ppc64le/386 \

I had used it before with ",linux" and it had worked, with another Dockerfile.

crazy-max commented 2 years ago

Only the last item is wrong, should be:

--platform linux/arm/v7,linux/arm64,linux/amd64,linux/ppc64le,linux/386
talesam commented 2 years ago

It worked well, but it only works if I go to https://hub.docker.com/r/talesam/flarum-webhooks-telegram-bridge click to copy the pull and paste it in the terminal, then download the image, if I give a pull directly from the terminal without clicking on the copy of the site, it gives an error or if you put it in a docker-compose, it gives an error, do I need to do something else to pull it straight? Strange that if I go to the search and type talesam the repository does not appear