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

Failing to access local Docker image #4045

Open
freigeistig opened this issue Apr 22, 2024 · 0 comments
Open

Failing to access local Docker image #4045

freigeistig opened this issue Apr 22, 2024 · 0 comments
Labels
type:bug Something isn't working

Comments

@freigeistig
Copy link

freigeistig commented Apr 22, 2024

What went wrong?

I am trying to run a project, which tries to access Docker images. If one of the images is stored locally and FROM is set like <image-name>:latest, I receive the following error:

Error: async earthfile2llb for +docker-<image-name>:
Earthfile line 304:4 apply FROM <image-name>:latest:
resolve image config for <image-name>:latest:
pull access denied, repository does not exist or may require authorization:
server message: insufficient_scope: authorization failed

And if FROM is like host.docker.internal/<image-name>:latest (important notice: previously I was using Ubuntu and was able to access local image using the 172.17.0.1 equivalent for host.docker.internal):

Error: async earthfile2llb for +docker-<image-name>:
Earthfile line 304:4 apply FROM host.docker.internal/<image-name>:latest:
resolve image config for host.docker.internal/<image-name>:latest:
failed to do request: Head "https://host.docker.internal/v2/<image-name>/manifests/latest":
dial tcp <ip-address>:443: connect: connection refused

Full command (unfortunately, I can't share the whole Earthfile):

docker-<image-name>:
    FROM host.docker.internal/<image-name>:latest
    ARG DOCKER_REGISTRY_URL
    ARG VERSION_TAG
    RUN apk add --no-cache jq wget
    COPY ops/entrypoint.sh /entrypoint.sh
    ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
    SAVE IMAGE <image-name>:latest
    IF [ "${DOCKER_REGISTRY_URL}" != "" ]
        SAVE IMAGE --push "${DOCKER_REGISTRY_URL}/<image-name>:${VERSION_TAG}"
    END

What should have happened?

Local image should be accessed successfully. I found no workarounds to access the local image, however, it is possible to access remote images.

What earthly version?

earthly version v0.8.7 c18f025070261439c15a97897a8940cb109ea7c4 darwin/arm64; macOS 14.1 homebrew

Buildkit Logs

No response

Other Helpful Information

Docker version 26.0.0, build 2ae903e
Docker Compose version v2.26.1-desktop.1
Docker Desktop verision v4.29.0

host.docker.internal is accessible on its own, I am able to run a different project and access it.

@freigeistig freigeistig added the type:bug Something isn't working label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant