pojntfx / hydrapp

Build fast apps that run everywhere with Go and a browser engine of your choice.
Apache License 2.0
58 stars 0 forks source link

Bug: cant build binaries : No such image: ghcr.io/pojntfx/hydrapp-build-binaries:latest #4

Closed gedw99 closed 3 weeks ago

gedw99 commented 1 month ago

Hey @pojntfx

I am on "release-main" version I am on Mac m2.

Just learning this.. Not sure what I am missing, but seems to be not getting the docker image ?

cd myapp && hydrapp build --exclude '(apk|deb|rpm|flatpak|msi|dmg|docs|tests)'
2024/08/09 17:08:47 Skipping deb/amd64 (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping dmg/ (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping flatpak/amd64 (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping msi/amd64 (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping rpm/amd64 (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping apk/ (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping tests/ (platform or architecture matched the provided regex)
2024/08/09 17:08:47 Skipping docs/ (platform or architecture matched the provided regex)
{"status":"Pulling from pojntfx/hydrapp-build-binaries","id":"latest"}
{"errorDetail":{"message":"no matching manifest for linux/arm64/v8 in the manifest list entries"},"error":"no matching manifest for linux/arm64/v8 in the manifest list entries"}
panic: Error response from daemon: No such image: ghcr.io/pojntfx/hydrapp-build-binaries:latest

goroutine 18 [running]:
github.com/pojntfx/hydrapp/hydrapp/cmd.init.func1.3({0x100afed98, 0x140001448c0})
        /Users/apple/workspace/go/src/junk/hydrapp/hydrapp/cmd/build.go:725 +0xf8
created by github.com/pojntfx/hydrapp/hydrapp/cmd.init.func1 in goroutine 1
        /Users/apple/workspace/go/src/junk/hydrapp/hydrapp/cmd/build.go:712 +0x328c

repro:

Place this Makefile in the out folder where hydrapp binary is built.

NAME=hydrapp
export PATH:=$(PATH):$(PWD)

RUN_CONFIG=$(HOME)/.local/share/hydrapp/secrets.yaml
RUN_CMD=$(NAME)

APP=myapp

print:

run:
    $(RUN_CMD) -h
run-new:
    # no help
    $(RUN_CMD) new
run-new-del:
    rm -rf myapp
run-work:
    touch go.work
    go work use myapp
run-work-del:
    rm -f go.work
run-start:
    cd $(APP) && go run .
run-build:
    cd $(APP) && $(RUN_CMD) build -h
    # binaries only
    cd $(APP) && $(RUN_CMD) build --exclude '(apk|deb|rpm|flatpak|msi|dmg|docs|tests)'
    # none
    #cd $(APP) && $(RUN_CMD) build --exclude '(binaries|apk|deb|rpm|flatpak|msi|dmg|docs|tests)'
gedw99 commented 1 month ago

https://github.com/pojntfx/hydrapp/pkgs/container/hydrapp-build-binaries seems to be there though...

gedw99 commented 1 month ago

seems its an access problem ?

docker pull ghcr.io/pojntfx/hydrapp-build-binaries
Using default tag: latest
Error response from daemon: Head "https://ghcr.io/v2/pojntfx/hydrapp-build-binaries/manifests/latest": denied: denied
gedw99 commented 1 month ago

BTW I get the same error on latest git version.

gedw99 commented 1 month ago

hey @pojntfx any chance you can fix this ?

pojntfx commented 3 weeks ago

Hi! Sorry about this, this seems to be because the old release images have been unpublished! I'll be pushing a new release soon, that should fix things :)

gedw99 commented 3 weeks ago

@pojntfx

No worries :)

I got this working fine after I properly logged in. I hardly use GitHub ...

docker login ghcr.io -u gedw99 --password-stdin

I ended up this next to your Makefile as a make include called hydrapp.mk, so its parameterised for reuse across many apps.


HYDRAPP_RUN_APP_NAME=myapp
HYDRAPP_RUN_GITHUB_USER=gedw99
HYDRAPP_RUN_APP_PATH=$(PWD)/$(HYDRAPP_RUN_APP_NAME)
HYDRAPP_CMD=$(BASE_BIN_TARGET)

hydrapp-print:
    @echo ""
    @echo "HYDRAPP_RUN_APP_NAME:    $(HYDRAPP_RUN_APP_NAME)"
    @echo "HYDRAPP_RUN_GITHUB_USER: $(HYDRAPP_RUN_GITHUB_USER)"
    @echo "HYDRAPP_RUN_APP_PATH:    $(HYDRAPP_RUN_APP_PATH)"
    @echo "HYDRAPP_CMD:             $(HYDRAPP_CMD)"

# PS> Invoke-WebRequest https://github.com/pojntfx/hydrapp/releases/download/release-main/hydrapp.windows-x86_64.exe -OutFile \Windows\System32\hydrapp.exe

hydrapp-run-h:
    $(HYDRAPP_CMD) -h

# NOTES: https://gist.github.com/yokawasa/841b6db379aa68b2859846da84a9643c

HYDRAPP_DOCKER_BASE_WEB=https://github.com/pojntfx/hydrapp/pkgs/container
HYDRAPP_DOCKER_BASE_URL=ghcr.io/pojntfx

# https://github.com/pojntfx/hydrapp/pkgs/container/hydrapp-build-binaries
HYDRAPP_DOCKER_BINARIES_NAME=hydrapp-build-binaries
HYDRAPP_DOCKER_BINARIES_WEB=$(HYDRAPP_DOCKER_BASE_WEB)/$(HYDRAPP_DOCKER_BINARIES_NAME)
HYDRAPP_DOCKER_BINARIES_URL=$(HYDRAPP_DOCKER_BASE_URL)/$(HYDRAPP_DOCKER_BINARIES_NAME)
HYDRAPP_DOCKER_BINARIES_TAG=main

# https://github.com/pojntfx/hydrapp/pkgs/container/hydrapp-build-dmg
HYDRAPP_DOCKER_DMG_NAME=hydrapp-build-dmg
HYDRAPP_DOCKER_DMG_WEB=$(HYDRAPP_DOCKER_BASE_WEB)/$(HYDRAPP_DOCKER_DMG_NAME)
HYDRAPP_DOCKER_DMG_URL=$(HYDRAPP_DOCKER_BASE_URL)/$(HYDRAPP_DOCKER_DMG_NAME)
HYDRAPP_DOCKER_DMG_TAG=main

# HYDRAPP_DOCKER_BINARIES_WEB=https://github.com/pojntfx/hydrapp/pkgs/container/hydrapp-build-tests
HYDRAPP_DOCKER_TEST_NAME=hydrapp-build-tests
HYDRAPP_DOCKER_TEST_WEB=$(HYDRAPP_DOCKER_BASE_WEB)/$(HYDRAPP_DOCKER_TEST_NAME)
HYDRAPP_DOCKER_TEST_URL=$(HYDRAPP_DOCKER_BASE_URL)/$(HYDRAPP_DOCKER_TEST_NAME)
HYDRAPP_DOCKER_TEST_TAG=main

# works
# HYDRAPP_DOCKER_BINARIES_WEB=https://github.com/pojntfx/hydrapp/pkgs/container/hydrapp-build-deb

hydrapp-github-login:
    # cant do docker pulls unless auth done.
    echo "$(GITHUB_TOKEN)" | docker login ghcr.io -u $(HYDRAPP_RUN_GITHUB_USER) --password-stdin

hydrapp-docker-inspect:
    docker inspect $(HYDRAPP_DOCKER_BINARIES_URL):$(HYDRAPP_DOCKER_BINARIES_TAG)
    docker inspect $(HYDRAPP_DOCKER_DMG_URL):$(HYDRAPP_DOCKER_DMG_TAG)
hydrapp-docker-pull:
    docker pull $(HYDRAPP_DOCKER_BINARIES_URL):$(HYDRAPP_DOCKER_BINARIES_TAG)
    docker pull $(HYDRAPP_DOCKER_DMG_URL):$(HYDRAPP_DOCKER_DMG_TAG)
    docker pull $(HYDRAPP_DOCKER_TEST_URL):$(HYDRAPP_DOCKER_TEST_TAG)

hydrapp-run-new-pre:
    touch go.work
    mkdir -p $(HYDRAPP_RUN_APP_NAME)
    go work use $(HYDRAPP_RUN_APP_NAME)
hydrapp-run-new-pre-del:
    rm -f go.work
hydrapp-run-new: 
    $(HYDRAPP_CMD) new

hydrapp-run-new-del:
    rm -rf $(HYDRAPP_RUN_APP_PATH)

hydrapp-run-run:
    # just a quick test
    cd $(HYDRAPP_RUN_APP_PATH) && go run .

hydrapp-run-build:
    cd $(HYDRAPP_RUN_APP_PATH) && $(HYDRAPP_CMD) build