git-crypt image that can serve as a base for other images that need git-crypt
4.4K
git-crypt docker image, based on Alpine Linux. Particularly useful as a base image for other image that depend on git-crypt to decrypt secrets from a repository before building or deploying the application.
To decrypt secrets encrypted with git-crypt, a GPG private key is needed. This key can be passes to the container in two ways:
The secret key can be passes to the container as the GPG_PRIVATE_KEY environment variable. If the private key is in armour format, a newline must be replaced by \n. If the key has a passphrase, this can (optionally) be passes as the GPG_PASSPHRASE environment variable.
Example:
docker run -it --rm -e GPG_PRIVATE_KEY="`cat private.key`" -e GPG_PASSPHRASE="mysecret" eurailcom/git-crypt
Map the .gnupg directory containing the private key of the host machine to /root/.gnugp of the container to make all keys from the host available to the container. If the key has a passphrase, this can (optionally) be passes as the GPG_PASSPHRASE environment variable. Note that the host's gpg-agent.conf file must allow for passphrase preset for this to work. If the host's .gnupg directory contains multiple keys, the GPG_UID environment variable can be used to select the desired key.
Example:
docker run -it --rm -v "~/.gnupg:/home/user/.gnupg" -e GPG_PASSPHRASE="mysecret" -e GPG_UID="[email protected]" eurailcom/git-crypt
Content type
Image
Digest
sha256:7f4a6429e…
Size
22.3 MB
Last updated
12 months ago
docker pull eurailcom/git-crypt