
TLS ベースの Docker デーモンが EC2 ホスト上で実行されています。
docker デーモンのローカルの docker クライアントは正常に動作しますが、docker-compose
以下のエラーが発生します。
$ export DOCKER_HOST=tcp://172.31.3.2:2376 DOCKER_TLS_VERIFY=1
ubuntu@ip-172-31-3-2:~$ docker --tls image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest fce289e99eb9 8 months ago 1.84kB
ubuntu@ip-172-31-3-2:~$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest fce289e99eb9 8 months ago 1.84kB
ubuntu@ip-172-31-3-2:~$ docker-compose -f jenkinsDocker/docker-compose.yml -p jenkins build
Building slavedotnet
ERROR: SSL error: HTTPSConnectionPool(host='172.31.3.2', port=2376): Max retries exceeded with url: /v1.21/build?q=False&pull=False&t=jenkins_slavedotnet&nocache=False&forcerm=False&rm=True (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:727)'),))
ubuntu@ip-172-31-3-2:~$
以下は、サーバー証明書を作成する前に使用される構成ファイルです。
{
"CN":"ec2-35-18x-xxx-xxx.ca-central-1.compute.amazonaws.com",
"hosts": [
"ec2-35-1xx-xxx-xxx.ca-central-1.compute.amazonaws.com",
"ip-172-31-3-2.ca-central-1.compute.internal",
"35.18x.xxx.xxx",
"172.31.3.2"
],
"Key": {
"algo": "rsa",
"size": 4096
},
"names": [
{
"C": "Canada",
"ST": "Saskatchewan",
"L": "Regina",
"O": "100000 Canada Inc.",
"OU": "Engineering"
}
]
}
ここdocker-compose
ツールの yml ファイルです。
docker-compose
docker デーモンに接続しないのはなぜですか? TLS を使用しています...