Skip to content

Conversation

@tianon
Copy link
Member

@tianon tianon commented Apr 16, 2019

Thanks to @jhoblitt for pointing these out over in docker-library/docker#153 👍 ❤️

@tianon tianon force-pushed the docker-doc-tweaks branch from ac0294d to 055be9b Compare April 16, 2019 20:41

## Start a daemon instance

**IMPORTANT:** this image defaults to `--storage-driver=vfs`, which will be very slow and inefficient (but is the only driver which is guaranteed to work regardless of your underlying filesystem). Which driver you should use varies depending on your needs, but a good rule of thumb is that your DinD instance should be using the same driver as your host (which can be seen under `Storage Driver` in the output of `docker info`). See the "Custom daemon flags" section below for how to specify your storage driver.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, docker-library/docker#89 is the PR which removed this. 👍 😇

**Note:** `--privileged` is required for Docker-in-Docker to function properly, but it should be used with care as it provides full access to the host environment, as explained [in the relevant section of the Docker documentation](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities).

By default, the `dind` variants of this image add `--host=tcp://0.0.0.0:2375` (on top of the explicit default of `--host=unix:///var/run/docker.sock`) in order to allow external containers to access `dockerd` appropriately (as the following examples illustrate).
By default, the `dind` variants of this image add `--host=tcp://0.0.0.0:2375` (on top of the explicit default of `--host=unix:///var/run/docker.sock`) in order to allow external containers to access `dockerd` appropriately (as the following examples illustrate). If you use `--network=host` or other methods of sharing network namespaces (such as Kubernetes pods, for example), this might be a security issue. To disable this image behavior, simply override the container command or entrypoint to run `dockerd` directly (`... docker:dind dockerd ...` or `... --entrypoint dockerd docker:dind ...`).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/docker-library/docker/blob/9743aac1937802f7a53db2001cf7e5d721d6c3aa/dockerd-entrypoint.sh#L4-L12

If the user explicitly passes dockerd, we don't munge the arguments at all (except to prepend dind).

@yosifkit yosifkit merged commit 1664b13 into docker-library:master Apr 16, 2019
@yosifkit yosifkit deleted the docker-doc-tweaks branch April 16, 2019 20:59
@jhoblitt
Copy link

@tianon @yosifkit That was an amazingly fast turn support turn around -- thank you!

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.

3 participants