Merge pull request #1 from shenxn/master
Update from shenxn/protonmail-bridge-docker
This commit is contained in:
commit
298bacbd6c
8 changed files with 28 additions and 11 deletions
|
|
@ -1,14 +1,15 @@
|
|||
FROM golang:1.15 AS build
|
||||
# Use carlosedp/golang for riscv64 support
|
||||
FROM carlosedp/golang:1.18 AS build
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-get update && apt-get install -y libsecret-1-dev
|
||||
RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev
|
||||
|
||||
# Build
|
||||
WORKDIR /build/
|
||||
COPY build.sh VERSION /build/
|
||||
RUN bash build.sh
|
||||
|
||||
FROM ubuntu:bionic
|
||||
FROM ubuntu:focal
|
||||
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
||||
|
||||
EXPOSE 25/tcp
|
||||
|
|
@ -23,6 +24,7 @@ RUN apt-get update \
|
|||
COPY gpgparams entrypoint.sh /protonmail/
|
||||
|
||||
# Copy protonmail
|
||||
COPY --from=build /build/proton-bridge/bridge /protonmail/
|
||||
COPY --from=build /build/proton-bridge/proton-bridge /protonmail/
|
||||
|
||||
# Add a user 'protonmail' with UID 8535
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
1.8.7
|
||||
3.0.4
|
||||
|
|
@ -9,5 +9,15 @@ git clone https://github.com/ProtonMail/proton-bridge.git
|
|||
cd proton-bridge
|
||||
git checkout v$VERSION
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [[ $ARCH == "armv7l" ]] ; then
|
||||
# This is expected to fail, and we use the following patch to fix
|
||||
make build-nogui || true
|
||||
# For 32bit architectures, there was a overflow error on the parser
|
||||
# This is a workaround for this problem found at:
|
||||
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
|
||||
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
|
||||
fi
|
||||
|
||||
# Build
|
||||
make build-nogui
|
||||
|
|
|
|||
|
|
@ -13,6 +13,12 @@ if [[ $1 == init ]]; then
|
|||
# Initialize pass
|
||||
gpg --generate-key --batch /protonmail/gpgparams
|
||||
pass init pass-key
|
||||
|
||||
# Kill the other instance as only one can be running at a time.
|
||||
# This allows users to run entrypoint init inside a running conainter
|
||||
# which is useful in a k8s environment.
|
||||
# || true to make sure this would not fail in case there is no running instance.
|
||||
pkill protonmail-bridge || true
|
||||
|
||||
# Login
|
||||
/protonmail/proton-bridge --cli $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue