-
Notifications
You must be signed in to change notification settings - Fork 454
Description
Note: this is a copy of a message about this issue that I wrote as a comment to docker issue #5169 (closed) see moby/moby#5169 (comment)
Although the docker documentation now clearly includes a warning about env variables being propagated to linked containers, this still looks like a real security problem to me, because many images, including official images pass secret information though env variables, and there still doesn't seem to be a good way to pass a private variable to a container at runtime.
This can be illustrated by a very simple php / mysql application using a database container,using the official mariadb image, linked with a php container based on the official php image.
The result is simply that any php program has access to the mysql root password via the env variables:

And really, this is not desirable!
Ok, this could be considered as a bug of the mariadb image and I will also enter it as such...
But my real feeling is that it looks more like a general docker issue.