This repository has been archived by the owner on Mar 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document RegistryAuthSupplier in the user manual
- Loading branch information
Showing
3 changed files
with
31 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,15 +47,6 @@ final DockerClient docker = DefaultDockerClient.fromEnv().build(); | |
// Pull an image | ||
docker.pull("busybox"); | ||
|
||
// Pull an image from a private repository | ||
// Server address defaults to "https://index.docker.io/v1/" | ||
RegistryAuth registryAuth = RegistryAuth.builder().email("[email protected]").username("foobar") | ||
.password("secret-password").serverAddress("https://myprivateregistry.com/v1/").build(); | ||
docker.pull("foobar/busybox-private:latest", registryAuth); | ||
|
||
// You can also set the RegistryAuth for the DockerClient instead of passing everytime you call pull() | ||
DockerClient docker = DefaultDockerClient.fromEnv().registryAuth(registryAuth).build(); | ||
|
||
// Bind container ports to host ports | ||
final String[] ports = {"80", "22"}; | ||
final Map<String, List<PortBinding>> portBindings = new HashMap<>(); | ||
|
@@ -111,7 +102,6 @@ docker.close(); | |
If you're looking for how to use docker-client, see the [User Manual][2]. | ||
If you're looking for how to build and develop it, keep reading. | ||
|
||
|
||
## Prerequisites | ||
|
||
docker-client should be buildable on any platform with Docker 1.6+, JDK7+, and a recent version of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters