pullImageCmd with registry config in DefaultDockerClientConfig
See original GitHub issueHi!
I am trying to pull an image from a private repository.
If I run the pullImageCmd providing an AuthConfig It works successfully :
AuthConfig authConfig = new AuthConfig().withUsername(username).withPassword(password)
.withRegistryAddress("https://xxxx.dkr.ecr.us-west-2.amazonaws.com");
dockerClient.pullImageCmd("xxxx.dkr.ecr.us-west-2.amazonaws.com/xxxx/xxxx")
.withTag("1.1").**withAuthConfig(authConfig)**
.exec(new PullImageResultCallback()).awaitCompletion();
But if I set the registry configuration when creating the DockerClient it doesn´t work
DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder().withRegistryPassword(password)
.withRegistryUsername(username)
.withRegistryUrl("https://xxxx.dkr.ecr.us-west-2.amazonaws.com")
.withDockerHost(environmentConfig.getDockerAgentAddress()).build();
dockerClient.pullImageCmd("xxxx.dkr.ecr.us-west-2.amazonaws.com/xxxx/xxxx")
.withTag("1.1").
.exec(new PullImageResultCallback()).awaitCompletion();
Why pullImageCmd is not using the DockerClientConfig when AuthConfig is not provided?
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
com.github.dockerjava.api.command.PullImageCmd ...
Produces a pull image request * * @param client * @param message * @return */ private PullImageCmd executePullImageRequest(DockerClient client, ...
Read more >A Docker Guide for Java - Baeldung
DefaultDockerClientConfig config = DefaultDockerClientConfig. ... images from registry services, we make use of the pullImageCmd method.
Read more >0 - Stack Overflow
I am trying to use the docker-java library but I am running into a problem when I try to pull an image. I...
Read more >com.github.dockerjava.api.model.AuthConfig Java Examples
Source Project: cubeai Author: cube-ai File: PullImageCommand.java License: Apache ... registryPassword = registryPassword; DefaultDockerClientConfig.
Read more >Getting started with Docker-Java -
DefaultDockerClientConfig clientConfig ... To download images from registry services, we make use of the pullImageCmd() method.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Feel free to debug code.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.