microsoft / microsoft/vscode-remote-release
Add support for `mount --ssh` at container build time
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Related to #1409. Once buildkit is available there is an experimental feature mount --ssh that should be supported.
Use Case
Install dependencies at build time from a git repository with ssh authentication. Described here https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066 and available for over 14 months now is the ability to mount SSH_AUTH_SOCK for specific RUN commands in docker that require SSH access. Use the host SSH_AUTH_SOCK to download dependencies.
Current workarounds
Install dependencies after build
cons: Requires a mount of the host ssh keys into the running container. Out development flow doesn't always revolve around vscode and we'd like a unified approach to installing these dependencies that don't change often but do vary from project to project
Create a base image with the dependencies already in them outside of vscode
cons: We try to keep our dev container and prod container in as close of parity as possible - typically using build stages where the two diverge. Requiring a different build base would not allow us to converge on a common dockerfile easily.
If there are any other workarounds any can think of I'd be interested in hearing about them. This is related to my teams specific use case but I have to imagine that the ssh mount is helpful to many people.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by tracing how this repository invokes Docker builds and handles BuildKit availability, then verify the documented mount --ssh use case with a build that accesses a git dependency through SSH. Done means supported build-time SSH mounting works without requiring post-build key mounts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, dockerfile
- Domain
- build-system, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100