amazeeio / docker-ssh-agent

Deprecated - see https://github.com/pygmystack/ssh-agent
https://github.com/pygmystack/ssh-agent
5 stars 3 forks source link

`volumes_from` is not compatible with Docker Compose v2 #2

Closed GROwen closed 1 year ago

GROwen commented 2 years ago

Background

Docker Desktop (Mac) 4.1.1 sets Docker Compose version 2 as the system default for Compose.

This is incompatible with the volumes_from declaration required in a projects docker-compose.yml.

volumes_from has been dropped in the Docker Compose file spec for v3 but v2 supports it.

This issue occurs with both v2 and v3 file formats.

Verified on WSL builds as well.

I'd like to refactor volumes_from to use volumes but am not sure how to configure that using the unnamed volume from amazeeio_ssh-agent.

Local setup versions

mac OS Big Sur (not M1) 11.6
Docker Desktop: 4.1.1 (69879)
Client:
...
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.6.3)
  compose: Docker Compose (Docker Inc., v2.0.0)
...
Server:
...
 Server Version: 20.10.8
...
Pygmy-go
Pygmy version vv0.7.1

Steps to reproduce

  1. Follow the Local Environment Setup for the drupal-example project I needed to alter the docker-compose.yml file to specify only the CLI service because of an error when referencing that service in the Dockerfile of the php and nginx services.
  2. run docker-compose up -d

Test steps

  1. Connect to the CLI container - docker-compose exec cli bash
  2. Check that SSH agent is running in the CLI service and the host identities have been added.

Actual behaviour

The following is output to stdout

no such service: amazeeio-ssh-agent

Expected behaviour

The stack builds, ssh agent is running and the host identity is added in the CLI service.

tobybellwood commented 1 year ago

This has now been fixed in docker-compose, see conversation at https://github.com/pygmystack/pygmy/issues/333