Intended to wrap a git repository (mounted as a volume) and manage secret files with GPG encryption.
778
This allows you to mount a git repo as a volume in the container and manage it with BlackBox and 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-blackbox:latest'
make build \
dockerhub_user='stevenaldinger' \
version="latest"
# Pushes an image to 'stevenaldinger/docker-blackbox:latest'
make push \
dockerhub_user='stevenaldinger' \
version="latest"
In general, when you run this docker image it will set your git user name/email, make sure the gpg agent is running, and create a directory named .blackbox if it doesn't already exist in the directory mounted at /repo to store your BlackBox config in. Then it will run any command you pass in.
cd into the git repo you want to manage with the image.Then run the container as a daemon:
docker run --rm --name blackbox \
-e GIT_USER_NAME="$(git config --get user.name)" \
-e GIT_USER_EMAIL="$(git config --get user.email)" \
-v $(pwd)/:/repo/ \
-v "$HOME/.ssh":/root/.ssh \
-v "$HOME/.gnupg":/root/.gnupg \
-d stevenaldinger/docker-blackbox:latest \
tail -f /dev/null
cd into docker-blackbox/examples/export GPG_KEY_EMAIL_ADDRESS='[email protected]'
BlackBox admin..env file..env file..env file.docker kill blackbox to finish up.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 BlackBox commands inside the container.
For an example of how this image works:
# used in the docker-compose.yml file
export GIT_USER_EMAIL="[email protected]"
export GIT_USER_NAME="Steven Aldinger"
# used in some of the example scripts
export GPG_KEY_EMAIL_ADDRESS='[email protected]'
docker-compose up -dstevenaldinger/docker-blackbox:latest container named blackbox./example-repo on the host machine for usage the example scriptsA directory of example scripts can be found at examples/ and include:
Content type
Image
Digest
Size
110.9 MB
Last updated
about 8 years ago
docker pull stevenaldinger/docker-blackbox