diff --git a/.env.example b/.env.example index b97fec6..a51f38f 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,5 @@ +# Build ARG GPG_PP. May still need to be empty to avoid breakage. +BUILD_GPG_PP= # Mandatory: Server address of the SMTP server to use. SMTP_SERVER=127.0.0.1 diff --git a/Dockerfile b/Dockerfile index 78189af..d64fd84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,13 @@ RUN apk update && \ sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf # Gpg for pass/pmb +ARG GPG_PP="" +RUN echo "@@@@@@@@@@@@@@@@@@@@ Passphrase:"${GPG_PP} RUN mkdir /root/.gnupg #RUN echo "default-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf #RUN echo "max-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf RUN gpg-agent --daemon --batch --disable-scdaemon -RUN gpg --quick-gen-key --batch --passphrase '' pmbkey +RUN gpg --quick-gen-key --batch --passphrase "${GPG_PP}" pmbkey RUN pass init pmbkey COPY dotmsmtprc /root/.msmtprc diff --git a/PMB_README.md b/PMB_README.md index 409e35d..1d77364 100644 --- a/PMB_README.md +++ b/PMB_README.md @@ -15,6 +15,7 @@ Build only seems to require `#usermod -aG docker username`. Not tested as root/ By default, `bridge` runs in non-interactive mode on container startup. You must set up the bridge initially: cp .env.example .env + vi .env docker-compose build docker-compose up -d docker-compose exec pmb bash diff --git a/docker-compose.yml b/docker-compose.yml index f671320..8a25a1f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,12 +2,16 @@ version: '2' services: pmb: build: + args: + GPG_PP: $BUILD_GPG_PP + #context: pmb-pf if git clone into existing dc dir context: . dockerfile: Dockerfile #image: juanluisbaptiste/postfix:latest expose: - "25" env_file: + #- pmb-pf/.env - .env restart: always volumes: