From 5794e489e09ab2489471bddf8ee5008b3c31759c Mon Sep 17 00:00:00 2001 From: Xiaonan Shen Date: Sun, 29 May 2022 17:29:45 +0800 Subject: [PATCH] Retry build only on arm32 --- Dockerfile | 8 ++++---- README.md | 4 ++-- build.sh | 4 +--- entrypoint.sh | 2 +- run_protonmail_bridge.sh | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11995b4..747358f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,11 +27,11 @@ RUN curl -sSL https://github.com/krallin/tini/releases/download/v0.19.0/tini-$(d && chmod +x /tini # Copy bash scripts -COPY gpgparams entrypoint.sh run_protonmail_bridge.sh cli.sh /protonmail/bin/ +COPY gpgparams entrypoint.sh run_protonmail_bridge.sh cli.sh /protonmail/script/ +RUN ln -s /protonmail/script/cli.sh /usr/local/bin/cli # Copy protonmail -COPY --from=build /build/proton-bridge/proton-bridge /protonmail/bin -ENV PATH "/protonmail/bin:${PATH}" +COPY --from=build /build/proton-bridge/proton-bridge /usr/local/bin/ VOLUME [ "/protonmail/data" ] -ENTRYPOINT ["/tini", "--", "/protonmail/bin/entrypoint.sh"] +ENTRYPOINT ["/tini", "--", "/protonmail/script/entrypoint.sh"] diff --git a/README.md b/README.md index 230c97f..a7342bd 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ All data are stored under `/protonmail/data`. ### CLI -2.0 comes with a CLI to easily interact with the bridge. There is no need to modify the entrypoint, manually kill any process, or restart the container when you are done. Everything you need is to `exec` into the container and run `cli.sh`. With that, you can add, remove, list accounts and print account info. Changing the address mode of an account is currently not supported. To do so, simply delete the account and add it back again. Example: +2.0 comes with a CLI to easily interact with the bridge. There is no need to modify the entrypoint, manually kill any process, or restart the container when you are done. Everything you need is to `exec` into the container and run `cli`. With that, you can add, remove, list accounts and print account info. Changing the address mode of an account is currently not supported. To do so, simply delete the account and add it back again. Example: ``` -➜ docker exec -it protonmail cli.sh +➜ docker exec -it protonmail cli CLI to interacte with Proton Bridge HTTP REST interface Available commands: login: Calls up the login procedure to add or connect accounts. diff --git a/build.sh b/build.sh index 71874d0..e9f53fe 100644 --- a/build.sh +++ b/build.sh @@ -12,9 +12,7 @@ rm -rf internal/frontend/cli cp -r /build/http_rest_frontend/cli internal/frontend/ # Build -if ! make build-nogui ; then - dpkg --print-architecture - +if (! make build-nogui) && [[ $(getconf LONG_BIT) == "32" ]]; then # If build fails it's probably because it is a 32bit # system and there was a overflow error on the parser # This is a workaround for this problem found at: diff --git a/entrypoint.sh b/entrypoint.sh index 697a52b..7c613a3 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -34,4 +34,4 @@ if [ -d /protonmail/data/.config/protonmail ]; then chown proton:proton -R /protonmail/data fi -exec gosu proton:proton run_protonmail_bridge.sh "$@" +exec gosu proton:proton /protonmail/script/run_protonmail_bridge.sh "$@" diff --git a/run_protonmail_bridge.sh b/run_protonmail_bridge.sh index 4200af1..e40df54 100755 --- a/run_protonmail_bridge.sh +++ b/run_protonmail_bridge.sh @@ -18,7 +18,7 @@ if [ ! -d ${GNUPG_PATH} ]; then export GNUPGHOME=/tmp/gnupg mkdir ${GNUPGHOME} chmod 700 ${GNUPGHOME} - gpg --generate-key --batch /protonmail/bin/gpgparams + gpg --generate-key --batch /protonmail/script/gpgparams pkill gpg-agent mv ${GNUPGHOME} ${GNUPG_PATH} export GNUPGHOME=${GNUPG_PATH}