Docker Community Forums

Share and learn in the Docker community.

SHH forwarding inside docker-compose

Hello,

I have successfully managed to get ssh forwarding to to pull provate git repos during a rust Cargo build - see https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066 - and I now have a Dockerfile that can be built with: docker build --ssh default .

I now wish to build the file with docker-compose but can not find any documentation on SSH forwarding inside compose? How can I include the --ssh default with docker compose so the RUN --mount=type=ssh .... in the Dockerfile works?