mirror of
https://github.com/docker/cli.git
synced 2026-08-24 02:24:17 -05:00
This adds an e2e regression test for authenticated pull/push against a private registry, covering the auth regression reported in docker/cli#5963. Includes: - New privateregistry service in the e2e Compose stack with htpasswd auth on port 5001, and --insecure-registry for the engine container. - TestPullPushPrivateRepository test that verifies authenticated push/pull and rejects unauthenticated operations. - Auth config and test credentials in e2e/testdata/registry/. - 90-second retry loop for transient DNS/container startup races. - Service health wait loop in scripts/test/e2e/run. - Increase TestProcessTermination timeout from 10s to 20s for connhelper-ssh + engine 25 combination. - Connhelper-ssh engine Dockerfile for private registry integration. Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
34 lines
836 B
Bash
Executable File
34 lines
836 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# Regenerate test certificates for the TLS-enabled private registry.
|
|
# Run this from the repository root or from e2e/testdata/registry/certs/.
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# --- CA ---
|
|
openssl genrsa -out ca.key 2048
|
|
openssl req -new -x509 -days 3650 \
|
|
-key ca.key \
|
|
-subj '/CN=Test CA (TLS Registry)' \
|
|
-out ca.crt
|
|
|
|
# --- Server cert for tlsregistry (signed by CA) ---
|
|
cat > openssl-tlsregistry.cnf <<-EOF
|
|
[v3_req]
|
|
subjectAltName=DNS:tlsregistry
|
|
EOF
|
|
openssl genrsa -out tlsregistry.key 2048
|
|
openssl req -new \
|
|
-key tlsregistry.key \
|
|
-subj '/CN=tlsregistry' \
|
|
-out tlsregistry.csr
|
|
openssl x509 -req -days 3650 \
|
|
-in tlsregistry.csr \
|
|
-CA ca.crt -CAkey ca.key \
|
|
-CAcreateserial \
|
|
-out tlsregistry.crt \
|
|
-extfile openssl-tlsregistry.cnf \
|
|
-extensions v3_req
|
|
rm -f tlsregistry.csr ca.srl openssl-tlsregistry.cnf
|