agent icon indicating copy to clipboard operation
agent copied to clipboard

Bump docker version to support ssh key in docker compose file

Open jesseduffield opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. Docker now lets you mount your SSH agent in a docker build: https://docs.docker.com/develop/develop-images/build_enhancements/#using-ssh-to-access-private-data-in-builds

You can even do this via a docker-compose file as of docker compose version 2.4 (see https://docs.docker.com/compose/release-notes/#240)

Describe the solution you'd like Bumping the docker compose version to 2.4

Describe alternatives you've considered None

Additional context I don't believe this requires any change to the docker compose plugin API because you should be able to go:

# in docker-compose.yml
services:
  app:
    build:
      ssh:
        - default

and it should just work.

I intend to use this via the AWS Elastic CI stack, so if required we would need to also update that stack.

Thanks!

jesseduffield avatar Aug 31 '22 02:08 jesseduffield

Hey @jesseduffield — that sounds useful.

Are you proposing we bump the version of docker-compose that gets installed inside the buildkite/agent:* docker images? e.g. here: https://github.com/buildkite/agent/blob/6fec074dce224d039821b3d650eb3f4062e69b24/packaging/docker/ubuntu-20.04-linux/Dockerfile#L4

I think that's the only place that this https://github.com/buildkite/agent repo references docker-compose (apart from in its own CI pipeline, perhaps).

I intend to use this via the AWS Elastic CI stack, so if required we would need to also update that stack.

Upgrading docker-compose in https://github.com/buildkite/elastic-ci-stack-for-aws is a bit more involved, and is tracked in https://github.com/buildkite/elastic-ci-stack-for-aws/issues/1022

pda avatar Sep 06 '22 02:09 pda

Ah, yes I do need this in the AWS Elastic CI stack. I'll leave a comment on that issue, thanks

jesseduffield avatar Sep 06 '22 18:09 jesseduffield