diff --git a/Dockerfile b/Dockerfile index 0e60e6d..42b39b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ COPY entrypoint /bin/ RUN chmod +x /bin/entrypoint COPY initproton /bin/ RUN chmod +x /bin/initproton -COPY gpgparams /tmp/ WORKDIR /var/lib/proton EXPOSE 25/tcp EXPOSE 143/tcp diff --git a/gpgparams b/gpgparams deleted file mode 100755 index 720ad37..0000000 --- a/gpgparams +++ /dev/null @@ -1,8 +0,0 @@ -%no-protection -%echo Generating a basic OpenPGP key -Key-Type: RSA -Key-Length: 2048 -Name-Real: pass-key -Expire-Date: 0 -%commit -%echo done \ No newline at end of file diff --git a/initproton b/initproton index 7b7aeeb..53b72dd 100755 --- a/initproton +++ b/initproton @@ -12,7 +12,8 @@ if [ -n "$PASS_FILE" ]; then fi if ! [ -f ./initialized ]; then - gpg --generate-key --batch /tmp/gpgparams + echo -e "%no-protection\nKey-Type: RSA\nKey-Length: 2048\nName-Real: $EMAIL\nExpire-Date: 0\n%commit" \ + | gpg --generate-key --batch pass init pass-key COMMAND="login\n$EMAIL\n$PASSWORD" RUN_2FA_LOGIN=${RUN_2FA_LOGIN:-}