Docker Community Forums

Share and learn in the Docker community.

SHH forwarding inside docker-compose


I have successfully managed to get ssh forwarding to to pull provate git repos during a rust Cargo build - see - 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?