features icon indicating copy to clipboard operation
features copied to clipboard

docker from docker?

Open eitsupi opened this issue 3 years ago • 6 comments

Hello. Thanks for a great series of work (which I use every day!)

This may be a stupid question, but isn't docker-outside-of-docker more common name than docker-from-docker for using the host machine's docker engine from within a container? Why call it docker-from-docker in this project?

eitsupi avatar Aug 31 '22 15:08 eitsupi

We are glad you are enjoying the open dev container specification 😄

Looping in @Chuxel / @bamurtaugh who may have more context on the naming history.

samruddhikhandale avatar Sep 02 '22 16:09 samruddhikhandale

@eitsupi Yeah "Docker out of Docker" or "Docker outside of Docker" is the common name for it, I agree. We could rename it and remap the old name. Short answer for why it has that name is just historical since it got called that before the pattern was in common use. It initially didn't work without exposing a TCP port on Windows since unix sockets aren't used there for a while and it become much more common after that socket forwarding started working in Docker Desktop (even pre WSL2).

The question was whether renaming was more confusing than using the existing name. Given the number of articles on DooD now, it might be worth switching it at least for the Features.

Chuxel avatar Sep 02 '22 22:09 Chuxel

Thank you for your response, it seems to me that renaming this now to docker-outside-of-docker would be a good idea, as it is a transitional period in how features are specified.

eitsupi avatar Sep 03 '22 01:09 eitsupi

I'm in favor of renaming it to docker-outside-of-docker. We just need to figure out the rename story in general for features. I don't think we'd want to publish it under both names, so then the question is do we just rename it and start publishing under the new name, leaving folks on the old name behind? Or do we so something to remap the old name to the new one like a redirect.

We are currently redirecting some "v1" features and rewriting them as follows: docker-from-docker -> ghcr.io/devcontainers/features/docker-from-docker:1

We could change the mapping to be docker-from-docker -> ghcr.io/devcontainers/features/docker-outside-of-docker:1, but then we also need to figure out what to do for people who are already referencing ghcr.io/devcontainers/features/docker-from-docker:* directly.

jkeech avatar Sep 06 '22 23:09 jkeech

One option would be to dual tag releases. The feature itself, repository and sources get renamed to the new folder. We can add an alias array property to devcontainer-feature.json so that the cli also dual tags the feature with the old name. It would probably also need to rename the tar file.

edgonmsft avatar Sep 09 '22 15:09 edgonmsft

We decided to move forward with the alias idea so that we can safely rename a feature, and if the devcontainer-feature.json has an alias property, we will continue to publish it under the aliased name. So the source code and everything can move to the new name, but we will publish both old and new names for backwards compatibility.

When we next bump up the major version, we will likely remove the alias since major version bumps already signify breaking changes and that's a good time to fully stop publishing the old name.

Once we implement alias support, we will rename docker-from-docker to docker-outside-of-docker.

jkeech avatar Sep 16 '22 22:09 jkeech

Closing as completed with https://github.com/devcontainers/features/pull/373

samruddhikhandale avatar Jan 04 '23 21:01 samruddhikhandale