docker_secret

command module
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 7 Imported by: 0

README

docker_secret

description

If you do not need docker swarm or k8s, but you really want to use docker secret, you have the alternative of use this project.

You need assign two environment:

  • "DIR_SECRET=/secret"
  • "SECRET=MYSQL_PASSWORD_FILE,MYSQL_ROOT_PASSWORD_FILE,CERT_EXAMPLE"

The environment DIR_SECRET means where your secret will be saved, and the environment SECRET will be split into an array which contains your secret file name.

If the environment SECRET contains a value starts from "CERT", this container will generate a pair of certificate and key.
For example, if SECRET=CERT_EXAMPLE, there will be two files called EXAMPLE.CRT and EXAMPLE.key generated under DIR_SECRET.

The secrets will be generated randomly if secrets is not exists in DIR_SECRET otherwise not.

quick-start

you can see an example here:

you can pull compiled images here:

for test

if you want to test your code, you can use environment DEVELOPMENT and set volume "/tmp/secret:/tmp/secret", we will copy all secrets to /tmp/secret/, and set the permission of dir /tmp/secret to 0755.

you can see example here:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL