Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build with buildx after pulling the base image from the harbor private image repository #1687

Open
3 tasks done
yangzz-97 opened this issue Mar 20, 2023 · 0 comments
Labels
kind/bug Something isn't working status/triage

Comments

@yangzz-97
Copy link

yangzz-97 commented Mar 20, 2023

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

environment:

[root@ecs-2a5c ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

docker info:

[root@ecs-2a5c ~]# docker -v
Docker version 23.0.1, build a5ee5b1
[root@ecs-2a5c ~]# docker-compose -v
Docker Compose version v2.6.0

harbor info:
harbor.v2.5.6

reoccurrence:
1)Set up the harbor private mirror warehouse
2)Enable the buildx function
3)Build multi-schema images using buildx

Expected behaviour

Successful construction

Actual behaviour

fail:

[root@ecs-2a5c harbor]# docker buildx build --platform linux/arm64,linux/amd64 -t test/arch --push .
[+] Building 0.0s (4/4) FINISHED
 => [internal] load build definition from Dockerfile                                                                                             0.0s
 => => transferring dockerfile: 270B                                                                                                             0.0s
 => [internal] load .dockerignore                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                  0.0s
 => ERROR [linux/amd64 internal] load metadata for ip:80/library/alpine:1.0                                                            0.0s
 => CANCELED [linux/arm64 internal] load metadata for ip:80/library/alpine:1.0                                                         0.0s
------
 > [linux/amd64 internal] load metadata for ip:80/library/alpine:1.0:
------
Dockerfile:1
--------------------
   1 | >>> FROM --platform=$BUILDPLATFORM ip:80/library/alpine:1.0 AS build
   2 |     ARG TARGETPLATFROM
   3 |     ARG BUILDPLATFROM
--------------------
ERROR: failed to solve: ip:80/library/alpine:1.0: failed to do request: Head "https://ip:80/v2/library/alpine/manifests/1.0": http: server gave HTTP response to HTTPS client

Buildx version

[root@ecs-2a5c harbor]# docker buildx version github.com/docker/buildx v0.10.2 00ed17d

Docker info

No response

Builders list

[root@ecs-2a5c harbor]# docker buildx ls
NAME/NODE    DRIVER/ENDPOINT             STATUS  BUILDKIT PLATFORMS
mybuilder *  docker-container
  mybuilder0 unix:///var/run/docker.sock running v0.11.4  linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6
default      docker
  default    default                     running 23.0.1   linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

Configuration

Dockerfile:

FROM --platform=$BUILDPLATFORM ip:80/library/alpine:1.0 AS build
ARG TARGETPLATFROM
ARG BUILDPLATFROM
RUN echo "test" > /log


FROM ip:80/library/alpine:1.0
COPY --from=build /log /log

Logs

No response

Additional info

No response

@yangzz-97 yangzz-97 added kind/bug Something isn't working status/triage labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/triage
Projects
None yet
Development

No branches or pull requests

1 participant