Giter VIP home page Giter VIP logo

Comments (6)

rnpridgeon avatar rnpridgeon commented on August 16, 2024

We should actually build a base jinja template which includes all shared configuration values such as ZOOKEEPER_CONNECT. Then each service can simply extend this speeding up initial setup of a service within the docker repo.

from cp-docker-images.

arrawatia avatar arrawatia commented on August 16, 2024

In general, it is not recommended to use ENV vars for secrets in docker. There is lot of discussion on the issue of managing secrets in docker. I have summarized it below

TL;DR

Passing secrets in env vars is bad. The best way for making secrets available to the container is using volumes (Kubernetes does it this way). The basic idea is that you create a mount point for secrets, something like /etc/secrets and the provisioning system puts the secrets in a volume and maps it to the docker container. So, if you are doing it manually for Kafka, you would create a directory on the host, add JKS file and credentials (in a file) and map this directory to /etc/secrets. The configure script will read this dir and add the credentials to the config.

There are various ways of storing secrets and mounting them on a volume for the container, some of which are linked in "Secret management in Docker" section below.

Why ENV vars are bad for runtime secrets ?

General discussion on "Secrets in docker"

Secret management in Kubernetes:

Secret management in Docker

from cp-docker-images.

arrawatia avatar arrawatia commented on August 16, 2024

@theduderog what's your take on this ?

from cp-docker-images.

theduderog avatar theduderog commented on August 16, 2024

I agreed that ENV vars are not a good way to pass secrets to containers b/c they're easy to leak. It seems like managing secrets in Docker is similar to "service discovery" in that there is no standard way to do it. Perhaps our default could be to expect a volume to be mounted with the secrets present but we need to allow people to plugin arbitrary code to get their secrets. I guess they can do it by overriding the "configure" step?

from cp-docker-images.

rnpridgeon avatar rnpridgeon commented on August 16, 2024

Makes sense to me

from cp-docker-images.

arrawatia avatar arrawatia commented on August 16, 2024

Implemented in #11.

from cp-docker-images.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.