Uh oh!
There was an error while loading. Please reload this page.
Add automatic TLS generation (and enable it by default in 19.03+) - #166
Merged
Conversation
tianon added a commit
to docker-library/official-images
that referenced
this pull request
Jul 17, 2019
For images which don't support this feature, this will be a no-op.
tianon
commented
Jul 17, 2019
MemberAuthor
Test updated in docker-library/official-images@7e44f39 👍 |
tianon
commented
Jul 17, 2019
MemberAuthor
(We should probably also add a new |
tianon
commented
Jul 17, 2019
MemberAuthor
(dat +529 −40 tho 😭) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| [ -z "${DOCKER_TLS_SAN:-}" ] || echo "$DOCKER_TLS_SAN" | ||
| } | sort -u | xargs printf '%s,' | sed "s/,\$//" | ||
| } | ||
| _tls_generate_certs() { |
Contributor
There was a problem hiding this comment.
any chance to split this to a separate script so that it can be called from rootless entrypoint script? #165
Uh oh!
There was an error while loading. Please reload this page.
This adds a `DOCKER_TLS_CERTDIR` environment variable that, when present, will auto-enable TLS on `dockerd` by default (and will set the appropriate client flags if the necessary certificates exist). It will attempt to generate a suitable `subjectAltName` extension value based on all available container IP addresses and hostnames, but the default generation can be extended via the `DOCKER_TLS_SAN` environment variable (in the standard OpenSSL format, ala `IP:n.n.n.n,DNS:foobar,...`). For users of 18.09 who wish to enable this behavior, simply set `DOCKER_TLS_CERTDIR` to a path within the container into which you want certificates generated (and share at least the `client` subdirectory of that path with your client containers). The default value in 19.03+ is `/certs` (so to mimic that, something like `-e DOCKER_TLS_CERTDIR=/certs` would be sufficient/appropriate). For users of 19.03+ who wish to *disable* this behavior (not recommended), simply set `DOCKER_TLS_CERTDIR` to the empty string (`-e DOCKER_TLS_CERTDIR=`).
AkihiroSuda
commented
Jul 18, 2019
Contributor
opened #168 for splitting tls script |
docker-library-bot added a commit
to docker-library-bot/official-images
that referenced
this pull request
Jul 18, 2019
Changes: - docker-library/docker@cad4d26: Merge pull request docker-library/docker#166 from infosiftr/auto-tls - docker-library/docker@651c075: Merge pull request docker-library/docker#167 from infosiftr/simpler-dind-example
This was referenced Jul 18, 2019
tianon
commented
Jul 19, 2019
MemberAuthor
Documentation PR is now open at docker-library/docs#1538 👍 |
no-reply pushed a commit
to surfliner/surfliner-mirror
that referenced
this pull request
Jul 24, 2019
Docker added a new TLS cert option in v19+, which is breaking dind usage in pipelines. This disables the 'auto-enable TLS' feature. see: - docker-library/docker#166 - https://gitlab.com/gitlab-com/gl-infra/production/issues/982 - https://gitlab.com/gitlab-org/gitlab-ce/issues/64968
thaJeztah added a commit
to thaJeztah/cli
that referenced
this pull request
Jul 29, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit
to thaJeztah/cli
that referenced
this pull request
Jul 29, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit
to thaJeztah/cli
that referenced
this pull request
Jul 29, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This was referenced Jul 29, 2019
thaJeztah added a commit
to thaJeztah/cli
that referenced
this pull request
Jul 30, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit
to thaJeztah/cli
that referenced
this pull request
Jul 30, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Jul 30, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: b1a3c1aad1d802975af11c16fce1177f09d1d97e Component: cli
docker-jenkins pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Aug 8, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1aad1d802975af11c16fce1177f09d1d97e) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 9c8ac0a1233944b0b3929bb34edc66d27c290293 Component: cli
docker-jenkins pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
Aug 8, 2019
The docker-in-docker image now enables TLS by default (added in docker-library/docker#166), which complicates testing in our environment, and isn't needed for the tests we're running. This patch sets the `DOCKER_TLS_CERTDIR` to an empty value to disable TLS. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit b1a3c1aad1d802975af11c16fce1177f09d1d97e) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: f357def0361cc2ae5f101ac95dff486ba4cd86c2 Component: cli
4 tasks
imrehg pushed a commit
to balena-os/meta-balena
that referenced
this pull request
Aug 9, 2019
The `docker` Docker Hub repository lists what versions of the image are supported and 18.6 is not among them at all. Use the current stable line of 18.09 instead, to stay on supported versions. See more info at: https://hub.docker.com/_/docker Also add a required parameter to run images from 18.09.8-dind onwards, due to this change: docker-library/docker#166 Change-type: minor Signed-off-by: Gergely Imreh <gergely@balena.io>
imrehg pushed a commit
to balena-os/meta-balena
that referenced
this pull request
Aug 9, 2019
The `docker` Docker Hub repository lists what versions of the image are supported and 18.6 is not among them at all. Use the current stable line of 18.09 instead, to stay on supported versions. See more info at: https://hub.docker.com/_/docker Also add a required parameter to run images from 18.09.8-dind onwards, due to this change: docker-library/docker#166 Here in effect disabling AutoTLS for the moment (TLS communication with the daemon) since it's all local anyways. Change-type: minor Signed-off-by: Gergely Imreh <gergely@balena.io>
imrehg pushed a commit
to balena-os/meta-balena
that referenced
this pull request
Aug 9, 2019
The `docker` Docker Hub repository lists what versions of the image are supported and 18.6 is not among them at all. Use the current stable line of 18.09 instead, to stay on supported versions. See more info at: https://hub.docker.com/_/docker Also add a required parameter to run images from 18.09.8-dind onwards, due to this change: docker-library/docker#166 Update the test checking for docker being up, too. Change-type: minor Signed-off-by: Gergely Imreh <gergely@balena.io>
imrehg pushed a commit
to balena-os/meta-balena
that referenced
this pull request
Aug 9, 2019
The `docker` Docker Hub repository lists what versions of the image are supported and 18.6 is not among them at all. Use the current stable line of 18.09 instead, to stay on supported versions. See more info at: https://hub.docker.com/_/docker Also added `DOCKER_HOST` as it affects `v18.09.8-dind` (which is trying to use tcp socket instead, it seems: docker-library/docker#175 after it enabled AutoTLS in docker-library/docker#166 Change-type: minor Signed-off-by: Gergely Imreh <gergely@balena.io>
ruzanowski added a commit
to ruzanowski/Ubiquitous
that referenced
this pull request
Jul 2, 2020
- name: docker:dind entrypoint: ["env", "-u", "DOCKER_HOST"] command: ["dockerd-entrypoint.sh"] variables: DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2 # See docker-library/docker#166 DOCKER_TLS_CERTDIR: ""
ruzanowski added a commit
to ruzanowski/Ubiquitous
that referenced
this pull request
Jul 2, 2020
- name: docker:dind entrypoint: ["env", "-u", "DOCKER_HOST"] command: ["dockerd-entrypoint.sh"] variables: DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2 # See docker-library/docker#166 DOCKER_TLS_CERTDIR: ""
ruzanowski added a commit
to ruzanowski/Ubiquitous
that referenced
this pull request
Jul 2, 2020
- name: docker:dind entrypoint: ["env", "-u", "DOCKER_HOST"] command: ["dockerd-entrypoint.sh"] variables: DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2 # See docker-library/docker#166 DOCKER_TLS_CERTDIR: ""
paulgirard added a commit
to medialab/toflit18_data
that referenced
this pull request
Sep 12, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes#164
Refs docker-library/docs#1525
This adds a
DOCKER_TLS_CERTDIRenvironment variable that, when present, will auto-enable TLS ondockerdby default (and will set the appropriate client flags if the necessary certificates exist).It will attempt to generate a suitable
subjectAltNameextension value based on all available container IP addresses and hostnames, but the default generation can be extended via theDOCKER_TLS_SANenvironment variable (in the standard OpenSSL format, alaIP:n.n.n.n,DNS:foobar,...).For users of 18.09 who wish to enable this behavior, simply set
DOCKER_TLS_CERTDIRto a path within the container into which you want certificates generated (and share at least theclientsubdirectory of that path with your client containers). The default value in 19.03+ is/certs(so to mimic that, something like-e DOCKER_TLS_CERTDIR=/certswould be sufficient/appropriate).For users of 19.03+ who wish to disable this behavior (not recommended), simply set
DOCKER_TLS_CERTDIRto the empty string (-e DOCKER_TLS_CERTDIR=).