GPG agent and helpers inside of a docker container.
479
This allows you to run GPG commands using your host machine's ~/.ssh and ~/.gnupg directories.
In the Makefile there are commands for both building and pushing the image to DockerHub.
# Builds an image named 'stevenaldinger/docker-gpg:latest'
make build \
dockerhub_user='stevenaldinger' \
version="latest"
# Pushes an image to 'stevenaldinger/docker-gpg:latest'
make push \
dockerhub_user='stevenaldinger' \
version="latest"
In general, when you run this docker image it will make sure the GPG agent is running and then it will run any command you pass in.
cd into the directory you want to export keys to.docker run --rm --name gpg \
-v "$HOME/.ssh":/root/.ssh \
-v "$(pwd)/gnupg":/gnupg/USBDrive/gnupg \
-d stevenaldinger/docker-gpg:latest \
tail -f /dev/null
The docker-compose.yml configuration runs tail -f /dev/null inside the container to keep it running and then the example files can be used to execute gpg commands inside the container.
Run make run to run a stevenaldinger/docker-gpg:latest container named gpg.
Run make keys with your desired email and name.
make keys \
[email protected] \
name='Drone Server'
Run make keys_anon to generated anonymous credentials.
make get_key \
[email protected]
make down
Content type
Image
Digest
Size
95.2 MB
Last updated
about 8 years ago
docker pull stevenaldinger/docker-gpg