Update for bridge 3.0.x.
This commit is contained in:
parent
9d5ead578d
commit
6db0b9271c
3 changed files with 42 additions and 25 deletions
47
Dockerfile
47
Dockerfile
|
|
@ -1,23 +1,27 @@
|
|||
# Build the ProtonMail Bridge.
|
||||
FROM golang:1.16-alpine as build
|
||||
FROM golang:1.18-buster as build
|
||||
ENV LANG C.UTF-8
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
gcc \
|
||||
git \
|
||||
libsecret-dev \
|
||||
make \
|
||||
musl-dev
|
||||
WORKDIR /usr/src
|
||||
|
||||
# Install required build packages
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
bash \
|
||||
build-essential \
|
||||
curl \
|
||||
git \
|
||||
libsecret-1-dev \
|
||||
musl-dev
|
||||
|
||||
# Download/build the application
|
||||
WORKDIR /usr/src
|
||||
ARG RELEASE
|
||||
ARG TAG
|
||||
RUN if [ -n "$RELEASE" ]; then \
|
||||
echo "Using release $RELEASE..." \
|
||||
&& curl -L -s "https://github.com/ProtonMail/proton-bridge/archive/$RELEASE.tar.gz" | tar zx \
|
||||
&& ln -s "proton-bridge-$RELEASE" proton-bridge \
|
||||
&& cd proton-bridge \
|
||||
&& export PROTON_BRIDGE="proton-bridge-$(echo $RELEASE | sed -e 's/^\(v\|br\)//')" \
|
||||
&& ln -s "${PROTON_BRIDGE}" proton-bridge \
|
||||
&& cd "${PROTON_BRIDGE}" \
|
||||
; else \
|
||||
git clone https://github.com/ProtonMail/proton-bridge.git proton-bridge \
|
||||
&& cd proton-bridge \
|
||||
|
|
@ -26,21 +30,26 @@ RUN if [ -n "$RELEASE" ]; then \
|
|||
&& make build-nogui
|
||||
|
||||
# Create a container for the ProtonMail Bridge.
|
||||
FROM alpine:edge
|
||||
FROM debian:stable
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
EXPOSE 25/tcp
|
||||
EXPOSE 143/tcp
|
||||
|
||||
COPY --from=build /usr/src/proton-bridge/proton-bridge /bin/proton-bridge
|
||||
COPY --from=build /usr/src/proton-bridge/bridge /bin/bridge
|
||||
COPY entrypoint /bin/
|
||||
COPY initproton /bin/
|
||||
RUN apk add --no-cache \
|
||||
libsecret \
|
||||
pass \
|
||||
socat \
|
||||
su-exec \
|
||||
&& chmod +x /bin/entrypoint \
|
||||
RUN apt-get update\
|
||||
&& apt-get install -y --no-install-recommends --no-install-suggests\
|
||||
libcap2\
|
||||
libsecret-1-0\
|
||||
gosu\
|
||||
gpg-agent\
|
||||
pass\
|
||||
socat\
|
||||
&& rm -rf /var/lib/apt/lists/*\
|
||||
&& chmod +x /bin/entrypoint\
|
||||
&& chmod +x /bin/initproton
|
||||
|
||||
WORKDIR /var/lib/proton
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue