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

Build harbor arm image error #44

Open
jepson66 opened this issue Apr 3, 2023 · 2 comments
Open

Build harbor arm image error #44

jepson66 opened this issue Apr 3, 2023 · 2 comments

Comments

@jepson66
Copy link

jepson66 commented Apr 3, 2023

1.My local environment is the virtual machine of the Apple system, m1 processor
2.Executed “make build GOBUILDTAGS="include_oss include_gcs" BUILDBIN=true NOTARYFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true PULL_BASE_FROM_DOCKERHUB=false"
3.Reported the following error:
image
4.Has anyone encountered this problem please? Can someone help me how to solve it? Thank you so much!

@andiariffin
Copy link

I just built the Harbor images using the provided instructions successfully and did not encounter the problem you had. I think from the error log it is quite clear that the docker buildx build command is having the wrong parameters.

Could you show your _build_prepare: value from /home/harbor-arm/src/github.com/goharbor/harbor/make/photon/Makefile, line 127-131?

_build_prepare:
        @$(call _build_base,$(PREPARE),$(DOCKERFILEPATH_PREPARE))
        @echo "building prepare container for photon..."
        @$(DOCKERBUILD_WITH_PULL_PARA) --build-arg harbor_base_image_version=$(BASEIMAGETAG) --build-arg harbor_base_namespace=$(BASEIMAGENAMESPACE) -f $(DOCKERFILEPATH_PREPARE)/$(DOCKERFILENAME_PREPARE) -t $(DOCKERIMAGENAME_PREPARE):$(VERSIONTAG) .
        @echo "Done."

Also, your docker parameters from the same file as above, line 19-22?

# docker parameters
DOCKERCMD=$(shell which docker)
DOCKERBUILD=$(DOCKERCMD) buildx build --platform linux/arm64 --progress plain --output=type=docker --no-cache
DOCKERBUILD_WITH_PULL_PARA=$(DOCKERBUILD) --pull=$(PULL_BASE_FROM_DOCKERHUB)

@Humble-Geralt
Copy link

just change the Makefile of /home/harbor-arm/src/github.com/goharbor/harbor/make/photon/Makefile
in line 21:
DOCKERBUILD=$(DOCKERCMD) buildx build --platform linux/arm64 --progress plain --output=type=docker --no-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants