-
Notifications
You must be signed in to change notification settings - Fork 474
Docker secrets support. #1700
Comments
You can use secrets right now with Portus. All You need are a few lines in your compose. Example, for config.yml same goes for other files. The PR openSUSE/docker-containers#74 simplifies it a bit. IMHO its not the right approach. Also it only works with Portus 2.2 not with 2.3
This assumes your application in the container is in |
Yes this would be possible but this requires to use a config-file. I dont use one right now as I want to keep it simple and configure everthing in one location (docker-compose file). I could get it wrong but setup would require me to copy /user/home/me/code/Portus/config/config.yml to all nodes of my swarm wouldn't it? |
In this example two things happen 1. config.yml is uploaded to docker 2. portus is told where to look for the file. You can separate the steps and have a compose that just does the lookup.(step 2.) Env vars and config-file/secrets contradict each other. You should (easiest way if) either use ENV vars or config/secret files. So if you prefer ENV vars why do you bother about config/secrets. |
To 1.: Thanks for pointing that out for me I had recently problems with volume mounting in swarm mode and assumed it would be the same issue for secrets. |
I am also missing an option to use Environment variables and secrets. The usual convention is to add a
This implementation was taken from https://github.com/docker-library/postgres/blob/master/docker-entrypoint.sh but can be seen all over official repositories supporting this convention. |
@Nols1000 @potzkovge thanks for this! I am used to how Kubernetes manages secrets (you can rotate them and all, and then set them for all pods as environment variables), but that's no excuse for not providing proper secrets support for other orchestrators (and including docker-compose). @potzkovge's idea looks truly great 👏 |
@Nols1000 @potzkovge I've merged openSUSE/docker-containers#100, which adds support for this. It will work as @potzkovge proposed for |
Added the |
@mssola you forgot to add support for |
@potzkovge done, thanks 👍 |
@mssola thank you for the fast development i've tested the newest 2.3 tag and it works as expected! I'll close my PR. |
This commit includes a bunch of changes proposed by the community in several issues. Fixes #1700 Fixes #1734 Fixes #1721 Fixes #1706 Signed-off-by: Miquel Sabaté Solà <[email protected]>
This commit includes a bunch of changes proposed by the community in several issues. Fixes #1700 Fixes #1734 Fixes #1721 Fixes #1706 Signed-off-by: Miquel Sabaté Solà <[email protected]>
Documentation added. Closing... |
Description
I recently wanted to update our infrastructure and looked into Manage sensitive data with Docker secrets. I couldn't find any documentation on this subject for Portus so I assume it is not supported yet. Then I found this pull-request openSUSE/docker-containers#74 and I dont get why this isn't merged yet. It would be nice if you could help me with information about how to use Docker secrets with Portus or with an explaination why it's not supported yet.
The text was updated successfully, but these errors were encountered: