Add Docker on Docker shim to docker-outside-of-docker #891
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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, callingdocker
from within the container will actually call the shim. Otherwise, the shim is available as thedond
command.It is a big improvement for the feature, in my opinion.
Please let me know your thoughts.
TODOs