-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Docker secrets #44
base: master
Are you sure you want to change the base?
Conversation
add docker secrets to protect sensitive information like passwords and private keys in .env file
adding directory of docker secrets instead of password
add docker secrets functions
add secrets section to da-node
@@ -8,6 +8,18 @@ | |||
# which causes the password to be incorrect. | |||
# To test that try running `docker run --rm --env-file .env busybox /bin/sh -c 'echo $NODE_ECDSA_KEY_PASSWORD'` | |||
# This will output password with single quote. Not sure why this happens. | |||
# Function to read Docker secrets | |||
read_secret() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used to read the content of Docker secrets (ecdsa_key_password and bls_key_password) and pass them to the Docker containers securely.
--volume "ecdsa_key_password:/run/secrets/ecdsa_key_password:ro"
--volume "bls_key_password:/run/secrets/bls_key_password:ro"
These lines in the docker run command mount the Docker secrets into the appropriate paths within the containers. The "read_secret()" function ensures that the contents of these secrets are correctly provided when the script is executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks. I will test this and update. thanks for the PR. appreciate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok thanks. I will test this and update. thanks for the PR. appreciate it.
hey, Is it passed the test?
Docker provides Docker Secrets for managing sensitive information securely. Secrets can be used to pass sensitive data directly to services without exposing them in plain text. so using docker secrets provide more security compared to storing them directly in environment files (e.g., .env files)