Decrypt with gpg from inside a docker container

I have an encrypted file with gpg that I want to decrypt from inside a docker container.
gpg is not found on the container, how would I add it.

  • How can I debug php mounted to a container running on docker beta for mac
  • Permission error when deploying Docker app from CI server to Heroku
  • Backing up data volume containers off machine
  • MongoDB “Unable to establish lock” error on mounted drive using Docker and Lustre
  • Start uwsgi from Docker
  • How can i view my dockerized container app that i just set up on Azure?
  • Docker container does not start on executing docker run command
  • Docker can't write to directory mounted using -v unless it has 777 permissions
  • Concourse CI Pipeline giving error :- Get https://registry-1.docker.io/v2: net/http: request canceled while waiting for connection
  • docker -v command doesn't mount files in a directory in Linux
  • Docker mongodb + node js. How to build working image?
  • anyway to setup npm credentials over `npm login` without reading input from STDIN?
  • One Solution collect form web for “Decrypt with gpg from inside a docker container”

    Depending on your base image (used by your container), you would need to add to your Dockerfile
    (or to make one, starting with FROM <the image used by your container>) with:

    RUN apt-get update && apt-get install gnupg
    

    (as in this docker-vault-init Dockerfile)

    Then check out “Adding GPG key inside docker container causes “no valid OpenPGP data found””.
    This could be needed:

    RUN apt-get install -y ca-certificates wget
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.