0
我試圖解密Docker容器內的gpg
文件。粗略地說了Dockerfile
做基本的東西:在Docker容器內非交互式解密gpg文件
FROM myimage
RUN ...
...
COPY docker-entrypoint.sh /entrypoint
RUN chmod u+x /entrypoint
的docker-entrypoint.sh
包含:
gpg --decrypt --passphrase=${PASSWORD} /path/to/encrypted/file > /path/to/unencrypted/file
...
exec "[email protected]"
我做:
docker build -t "myimage" .
docker run -e PASSWORD -ti myimage
而且我越來越:
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
usage: gpg [options] --decrypt [filename]
…一個是一個錯誤。密碼環境var正在正確傳遞,並且該命令在我的機器上正確運行。
我試過gpg2
沒有成功。