Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker on Docker shim to docker-outside-of-docker #891

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

felipecrs
Copy link
Contributor

@felipecrs felipecrs commented Mar 4, 2024

As an avid user of Docker on Docker (or as you call, Docker outside of Docker), I figured that not being able to handle volume mounts within the container is unnaceptable. That's why I built the Docker on Docker shim, which is a transparent shim that translates paths within the container to their correct counterparts on the host.

Apart from just devcontainer's needs, I built the tool for some business use cases as well. For example, to have it packed in a CI/CD pipeline to allow running workload within containers, or to have a tool that ships as a container but needs to spawn more containers within it, without the overhead of running a full Docker daemon and the --privileged flag.

I have been testing internally it for almost an year by now in production, and I believe it has matured enough to be shipped by this feature by default. It is also very well tested.

When useDockerOnDockerShimAsDocker is enabled, calling docker from within the container will actually call the shim. Otherwise, the shim is available as the dond command.

It is a big improvement for the feature, in my opinion.

Please let me know your thoughts.

TODOs

  • Add tests for the feature

@felipecrs felipecrs requested a review from a team as a code owner March 4, 2024 13:09
@felipecrs felipecrs marked this pull request as draft March 4, 2024 13:10
@felipecrs felipecrs marked this pull request as ready for review March 4, 2024 13:51
@samruddhikhandale
Copy link
Member

Hi 👋

We appreciate your enthusiasm and contribution for adding docker-on-docker-shim to the first party Feature. However, as https://github.com/felipecrs/docker-on-docker-shim is hosted on a personal repository, I'm afraid we won't be able to accept this contribution. We rely on first party/official releases of tools/artifacts which are trusted by the community and are happy to add it to their dev container without second thoughts.

@felipecrs Have you thought of publishing it as new Feature which you could share with the community? The devcontainers/feature-starter repo has more guidance on self authoring them.

Once you've self authored and if you'd like to share it with the community, we'd recommend adding it to the index. It will make them visible in our supporting tools (like https://containers.dev/templates, Dev Containers Extension, GitHub Codespaces etc).

Feel free to ask any questions/queries along the way, feedbacks are welcome too!

Looping in @bamurtaugh (whose a PM on our team) to share her thoughts as well, thanks!

@felipecrs
Copy link
Contributor Author

Hi @samruddhikhandale, super understand. I will try creating a devcontainer feature for it too. Thanks for the advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants