Docker With GitLab Secrets
Wraps Docker to run with GitLab build variables.
Installation
Prerequisites: - Python >= 3.6 - docker
Stable releases can be installed via PyPI:
$ pip install dockerwithgitlabsecrets
Bleeding edge versions can be installed directly from GitHub:
$ pip install git+https://github.com/wtsi-hgi/docker-with-gitlab-secrets.git@commit_id_or_branch_or_tag#egg=dockerwithgitlabsecrets
Usage
Wrap your prefixed Docker command with:
usage: docker-with-gitlab-secrets [-h] [--dwgs-config DWGS_CONFIG]
[--dwgs-project DWGS_PROJECT]
[--env-file ENV_FILE]
Docker With GitLab Secrets
optional arguments:
-h, --help show this help message and exit
--dwgs-config DWGS_CONFIG
location of the configuration file (will default to
/Users/cn13/.dwgs-config.yml)
--dwgs-project DWGS_PROJECT
GitLab project (if not namespaced in the form
"namespace/project", the default namespace defined in
the configuration file will be used). If not defined,
the default project in the configuration file will be
used
Examples
Run a new container with secrets from a GitLab project:
docker-with-gitlab-secrets --dwgs-config my-config.yml --dwgs-project my-project \
run --rm alpine printenv GITLAB_SECRET
Wrapping unrelated Docker commands will still work:
docker-with-gitlab-secrets --dwgs-config my-config.yml \
version
Run a container interactively that will have secrets from a GitLab project in the environment:
docker-with-gitlab-secrets --dwgs-config my-config.yml --dwgs-project my-project \
run --rm -it ubuntu
Configuration
Example:
gitlab:
url: https://gitlab.example.com
token: my-token
project: hgi-systems # Optional default project, which will be overriden by if `dwgs-project` is specified
namespace: hgi # Optional default namespace
Known Issues
Docker cannot pass newlines in variables via `–env-file`` <https://github.com/moby/moby/issues/12997>`__. Therefore multiline GitLab variables with have their line-breaks escaped to \n.
Metadata
Release files for dockerwithgitlabsecrets 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dockerwithgitlabsecrets-2.0.1.tar.gz | 8.6 kB | Without provenance | Details for dockerwithgitlabsecrets-2.0.1.tar.gz |
Release files / dockerwithgitlabsecrets-2.0.1.tar.gz
| Download URL | dockerwithgitlabsecrets-2.0.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b79362cef12cfb3b7bd2bf20a04857b28ad4b822a75dd0ed6025ddc052152a9b
|
|
BLAKE2b-256 checksum How to use checksums |
3746f6427e9d8bcf3bc51f05c6bdaa4e79d920f5216d580b08c3cff0e1c6f1c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dockerwithgitlabsecrets 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.