Skip to content

implement new docker config file format for authentication #727

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

Merged
merged 6 commits into from
Nov 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/github/dockerjava/api/DockerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public interface DockerClient extends Closeable {

TopContainerCmd topContainerCmd(String containerId);

TagImageCmd tagImageCmd(String imageId, String repository, String tag);
TagImageCmd tagImageCmd(String imageId, String imageNameWithRepository, String tag);

PauseContainerCmd pauseContainerCmd(String containerId);

Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/github/dockerjava/api/command/AuthCmd.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.github.dockerjava.api.command;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

import com.github.dockerjava.api.exception.UnauthorizedException;
import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.AuthResponse;

import javax.annotation.CheckForNull;

/**
*
* Authenticate with the server, useful for checking authentication.
Expand All @@ -17,7 +16,7 @@ public interface AuthCmd extends SyncDockerCmd<AuthResponse> {
@CheckForNull
AuthConfig getAuthConfig();

AuthCmd withAuthConfig(@Nonnull AuthConfig authConfig);
AuthCmd withAuthConfig(AuthConfig authConfig);

/**
* @return The status. Based on it's value you may mean you need to authorise your account, e.g.: "Account created. Please see the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.github.dockerjava.api.exception.ConflictException;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.Bind;
import com.github.dockerjava.api.model.Capability;
import com.github.dockerjava.api.model.Device;
Expand All @@ -23,6 +24,9 @@

public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerResponse> {

@CheckForNull
AuthConfig getAuthConfig();

@CheckForNull
List<String> getAliases();

Expand Down Expand Up @@ -197,6 +201,14 @@ public interface CreateContainerCmd extends SyncDockerCmd<CreateContainerRespons
@CheckForNull
Boolean isTty();

/**
* While using swarm classic, you can provide an optional auth config which will be used to pull images from a private registry,
* if the swarm node does not already have the docker image.
* Note: This option does not have any effect in normal docker
* @param authConfig The optional auth config
*/
CreateContainerCmd withAuthConfig(AuthConfig authConfig);

/**
* Add network-scoped alias for the container
* @param aliases on ore more aliases
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.github.dockerjava.api.command;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

import com.github.dockerjava.api.model.AuthConfig;
import com.github.dockerjava.api.model.PullResponseItem;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

/**
*
* Pull image from repository.
Expand All @@ -22,6 +22,7 @@ public interface PullImageCmd extends AsyncDockerCmd<PullImageCmd, PullResponseI
@CheckForNull
String getRegistry();

@CheckForNull
AuthConfig getAuthConfig();

PullImageCmd withRepository(@Nonnull String repository);
Expand Down
210 changes: 0 additions & 210 deletions src/main/java/com/github/dockerjava/core/AuthConfigFile.java

This file was deleted.

Loading