简体   繁体   English

从 docker 容器内使用 gpg 解密

[英]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 的加密文件,我想从 docker 容器内部对其进行解密。 gpg is not found on the container, how would I add it.在容器上找不到 gpg,我将如何添加它。

Depending on your base image (used by your container), you would need to add to your Dockerfile根据您的基本映像(由您的容器使用),您需要添加到 Dockerfile
(or to make one, starting with FROM <the image used by your container> ) with: (或制作一个,从FROM <the image used by your container> ):

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

(as in this docker-vault-init Dockerfile ) (如在这个docker-vault-init Dockerfile 中

Then check out " Adding GPG key inside docker container causes “no valid OpenPGP data found” ".然后查看“在 docker 容器内添加 GPG 密钥导致“找不到有效的 OpenPGP 数据” ”。
This could be needed:这可能需要:

RUN apt-get install -y ca-certificates wget

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM