Skip to content

Parse Docker images of <name>:<tag>@sha256:<hash> format #2127

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

Closed
leomao10 opened this issue May 30, 2023 · 1 comment · Fixed by #2128
Closed

Parse Docker images of <name>:<tag>@sha256:<hash> format #2127

leomao10 opened this issue May 30, 2023 · 1 comment · Fixed by #2128

Comments

@leomao10
Copy link

We currently got following error:

com.github.dockerjava.core.exception.InvalidRepositoryNameException: Repository name "library/node:18.16.0-alpine" is invalid. Component: node:18.16.0-alpine
	at com.github.dockerjava.core.NameParser.validateRepoName(NameParser.java:95)
	at com.github.dockerjava.core.NameParser.resolveRepositoryName(NameParser.java:122)
	at com.github.dockerjava.core.DefaultDockerClientConfig.effectiveAuthConfig(DefaultDockerClientConfig.java:299)
	at com.github.dockerjava.core.DockerClientImpl.pullImageCmd(DockerClientImpl.java:310)

When we try to pull image with docker-java with following image format: docker.io/library/node:18.16.0-alpine@sha256:1ccc70acda680aa4ba47f53e7c40b2d4d6892de74817128e0662d32647dd7f4d, while we notice that we can use this docker image format with docker pull, and get result correctly.

Here is the docker version we use for testing:

Client:
 Cloud integration: v1.0.29
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.7
 Git commit:        baeda1f
 Built:             Tue Oct 25 18:01:18 2022
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.15.0 (93002)
 Engine:
  Version:          20.10.21
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.7
  Git commit:       3056208
  Built:            Tue Oct 25 17:59:41 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.10
  GitCommit:        770bd0108c32f3fb5c73ae1264f7e503fe7b2661
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Wondering if we should make behaviour consistent with docker desktop.

Similar issue reported in testcontainers/testcontainers-java#4762 and I suspect it is because they are also using docker-java under the hook.

@setchy
Copy link
Contributor

setchy commented Jun 19, 2023

PR opened: #2128

eddumelendez pushed a commit that referenced this issue Jun 19, 2023
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

Successfully merging a pull request may close this issue.

2 participants