简体   繁体   中英

Client sent an HTTP request to an HTTPS server. Docker-Compose with Docker-Machine

I'm trying to run docker-compose on DigitalOcean droplet using docker-machine.

  1. I've created a dropled and used docker-machine create to hook it up to the docker-machine.
  2. I can connect via docker-machine ssh my-machine
  3. I use eval $(docker-machine env wdf-rails) to run docker commands in the proper context
  4. docker ps does not return error, but docker-compose ps returns the error:

ERROR: Client sent an HTTP request to an HTTPS server.

I've been using this setup for years and I've never experienced this issue before.

Notes:

It doesn't matter what configuration you have in the docker-compose.yml . Fails even for such a minimal config as listed below:

version: "3.7"

services:
  redis:
    image: "redis:alpine"

What I've realized was that I have installed the edge version of the docker client and this was the reason why it started to fail.

Removing the edge installation and installing the stable version of the docker client solved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM