https://github.com/softonic/docker-secret-mounter
Mounts the specified secrets in a predefined folder that should be mounted as a volume
https://github.com/softonic/docker-secret-mounter
Last synced: 11 months ago
JSON representation
Mounts the specified secrets in a predefined folder that should be mounted as a volume
- Host: GitHub
- URL: https://github.com/softonic/docker-secret-mounter
- Owner: softonic
- License: other
- Created: 2017-06-02T14:25:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-10T08:30:39.000Z (over 6 years ago)
- Last Synced: 2025-04-08T07:44:01.062Z (about 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# softonic/secret-mounter
Mounts the specified secrets in a predefined folder that should be mounted as a volume
## Description
This image is designed to obtain in runtime a list of files (usually secrets) from a remote repository.
In this case the structure of the repository needs to follow the convention of:
- PROJECT/ENVIRONMENT
For example
```
gitroot
|- project1
| |- staging
| | |- secret1
| | |- secret2
| |- production
| |- secret1
| |- secret2
|- project2
|- staging
|- secret1
|- secret2
...
```
## Usage
You'll need to launch the container with the needed parameters.
### Parameters
- PROJECT: project name
- ENVIRONMENT: Project environment where the secrets are valid
- GIT_REPO: Repository that contains the secrets
- GIT_PK: Private key to get access to the repo
### Execution
```
docker run \
-ti \
--rm \
-v $PWD/sec:/secrets \
-e PROJECT=project2 \
-e ENVIRONMENT=staging \
-e GIT_REPO=git@my-git.server/repo \
-e GIT_PK=$(base64 ~/.ssh/id_rsa_secrets) \
softonic/secret-mounter
```