SSH access
Make your SSH keys visible to the SSH agent:
# Linux
ssh-add -K
# macOS
ssh-add --apple-use-keychainVerify your keys are visible to the SSH agent:
ssh-add -LDefine a RUN command in Dockerfile which should have access to your SSH keys:
RUN --mount=type=ssh <COMMAND>Build:
docker build --ssh default .Or use Docker Compose (v2):
services:
my-service:
build:
dockerfile: Dockerfile
context: .
ssh:
- default
...