0
TLS based docker daemon is running on EC2 host.
docker client local to the docker daemon works fine, but docker-compose
gives below error:
$ 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:~$
Below is the configuration file used before creating server certs.
{
"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"
}
]
}
here is yml file for docker-compose
tool.
Why docker-compose
does not connect to docker daemon? using TLS...
From a remote docker client am able to launch containers on docker host – overexchange – 2019-09-18T20:22:47.157
from remote docker client
docker-compose
command works fine – overexchange – 2019-09-18T21:45:08.810