0

docker-compose --context remote (up|dows|ps|...) doesn't do anything. although docker --context remote ps works, connects to the remote and lists the containters. also, running it locally is ok (just docker-compose up)

docker --version on local machine: Docker version 20.10.2, build 2291f610ae

docker --version on remote machine: Docker version 20.10.2, build 2291f61

docker-compose version on local machine:

docker-compose version 1.28.0, build unknown
docker-py version: 4.4.1
CPython version: 3.9.1
OpenSSL version: OpenSSL 1.1.1i  8 Dec 2020

I don't know what other thing to provide.

EDIT: docker-compose -H "ssh://user@host" up does exactly that what the --context does, nothing.

docker-compose --verbose --context remote up prints out just this: compose.config.config.find: Using configuration files: ./docker-compose.yml

microo8
  • 3,568
  • 5
  • 37
  • 67
  • The --context option doesn't appear in the docs... what about [using -H to pass the remote host](https://docs.docker.com/compose/reference/overview/)? [This answer](https://stackoverflow.com/a/53524793/1941519) covers setting the DOCKER_HOST environment variable as an alternative – Jacob Jan 21 '21 at 10:52
  • It's strange that --context isn't in the docs. because it is in `docker-compose --help`. creating a ssh tunnel and then running `docker-compose -H "tcp://localhost:2377" up` prints out a error: `docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))` – microo8 Jan 21 '21 at 11:18
  • Have you tried connecting to SSH directly in docker-compose? `docker-compose -H "ssh://user@host" up` – Jacob Jan 21 '21 at 12:30
  • Now that I've read up on contexts, you could try adding the `--verbose` flag to your context call and if anything useful comes out, add it to your question. – Jacob Jan 21 '21 at 12:31

1 Answers1

0

for me, COMPOSE_PARAMIKO_SSH=1 fixed it. Not 100% sure why- something something reusing ssh connections

quq
  • 61
  • 1
  • 3