Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
updated default username/password to be just "dockerjava" as hyphen i…
…s not allowed in usernames by Docker
  • Loading branch information
alexec committed Nov 2, 2014
commit 402fa2b1e3d146083ae71128d3209ab4a5a30bd2
2 changes: 0 additions & 2 deletions docker-auth-registry/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# https://medium.com/@deeeet/building-private-docker-registry-with-basic-authentication-with-self-signed-certificate-using-it-e6329085e612

FROM registry

RUN apt-get update
Expand Down
2 changes: 2 additions & 0 deletions docker-auth-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ This creates a registry that runs locally with plain text authentication set-up.
./build.sh
./run.sh
./test.sh

Based on <https://medium.com/@deeeet/building-private-docker-registry-with-basic-authentication-with-self-signed-certificate-using-it-e6329085e612>.
2 changes: 1 addition & 1 deletion docker-auth-registry/docker-registry.htpasswd
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker-java:$apr1$nhxYQXIn$s93lYeFNs66YAXwQerlHL0
dockerjava:$apr1$9s.aEJml$nivZMa6GEWnJA/FhpTPbj0
2 changes: 1 addition & 1 deletion docker-auth-registry/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
set -eux

curl http://localhost:5001/v1/_ping
curl http://localhost:5001/v1/users/ --basic --user docker-java:docker-java
curl http://localhost:5001/v1/users/ --basic --user dockerjava:dockerjava

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ public abstract class AbstractDockerClientTest extends Assert {

public static final Logger LOG = LoggerFactory
.getLogger(AbstractDockerClientTest.class);

protected DockerClient dockerClient;
public static final String DOCKER_JAVA = "dockerjava";

protected DockerClient dockerClient;

protected TestDockerCmdExecFactory dockerCmdExecFactory = new TestDockerCmdExecFactory(DockerClientBuilder.getDefaultDockerCmdExecFactory());

Expand All @@ -46,15 +47,15 @@ public void beforeTest() {
}

private DockerClientConfig config() {
return config("docker-java");
return config(DOCKER_JAVA);
}

protected DockerClientConfig config(String password) {
return DockerClientConfig.createDefaultConfigBuilder()
.withServerAddress("http://localhost:5001")
.withUsername("docker-java")
.withUsername(DOCKER_JAVA)
.withPassword(password)
.withEmail("docker-java@github.com")
.withEmail(DOCKER_JAVA + "@github.com")
.build();
}

Expand Down