| 123456789101112131415161718192021222324252627 |
- #!/bin/sh
- . ./common/get_args.sh $*
- if [ -z ${PORT} ]
- then
- REGISTRY_CERT_FILE=/tmp/registry_cert.crt
- # Get the registry host certificate
- echo -n \
- | openssl s_client -connect ${REGISTRY_HOSTNAME}:443 \
- | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \
- > ${REGISTRY_CERT_FILE}
- docker run --rm \
- -v $(pwd)/test-container-in.sh:/test-container-in.sh \
- -v $(pwd)/common/get_args.sh:/common/get_args.sh \
- -v ${REGISTRY_CERT_FILE}:/registry_cert.crt \
- dolphm/network-tools \
- /test-container-in.sh ${REGISTRY_HOSTNAME}
- else
- docker run --rm \
- -v $(pwd)/test-container-in.sh:/test-container-in.sh \
- -v $(pwd)/common/get_args.sh:/common/get_args.sh \
- dolphm/network-tools \
- /test-container-in.sh ${REGISTRY_HOSTNAME}
- fi
|