Hi,
I had a working dev application with http only of traefik and a microservice running in docker-compose. Now I am changing it to https. I use mkcert to generate a couple of mock certficates for dev.localhost.
Docker-compose
version: '3'
services:
traefik:
image: traefik:v2.0
command:
- --entryPoints.web.address=:80
- --entryPoints.web-secure.address=:443
- --providers.docker=true
- --providers.docker.exposedByDefault=false
- --providers.docker.tls.cert=/etc/certs/dev.localhost+4.pem
- --providers.docker.tls.key=/etc/certs/dev.localhost+4-key.pem
- --accesslog=true
- --log.level=DEBUG
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./certs:/etc/certs
labels:
- "traefik.enable: true"
- "traefik.http.routers.api.entrypoints: web"
- "traefik.http.routers.api.service: api@internal"
test-api:
build: ./node/test-api
ports:
- 8100
labels:
- "traefik.enable=true"
- "traefik.http.routers.test-api.rule=Host(`dev.localhost`) && PathPrefix(`/api/test`)"
- "traefik.http.routers.test-api.entrypoints: web-secure"
On building the compose, I get these errors:
traefik_1 | time="2019-11-26T00:15:48Z" level=debug msg="FIXME: Got an status-code for which error does not match any expected type!!!: -1" module=api status_code=-1
traefik_1 | time="2019-11-26T00:15:48Z" level=error msg="Failed to retrieve information of the docker client and server host: error during connect: Get https://%2Fvar%2Frun%2Fdocker.sock/v1.24/version: http: server gave HTTP response to HTTPS client" providerName=docker
traefik_1 | time="2019-11-26T00:15:48Z" level=error msg="Provider connection error error during connect: Get https://%2Fvar%2Frun%2Fdocker.sock/v1.24/version: http: server gave HTTP response to HTTPS client, retrying in 1.080381816s" providerName=docker
I am looking for help in correcting the config.
Thanks!