use old build structure and update to golang 1.25
This commit is contained in:
+8
-9
@@ -1,18 +1,18 @@
|
|||||||
# The build image could be golang, but it currently does not support riscv64. Only debian:sid does, at the time of writing.
|
FROM golang:1.25 AS build
|
||||||
FROM debian:sid-slim AS build
|
|
||||||
|
|
||||||
ARG version
|
ARG version
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y golang build-essential libsecret-1-dev
|
RUN apt-get update && apt-get install -y build-essential libsecret-1-dev
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
ADD https://github.com/ProtonMail/proton-bridge.git#${version} /build/
|
ADD https://github.com/ProtonMail/proton-bridge.git#${version} /build/
|
||||||
WORKDIR /build/
|
WORKDIR /build/
|
||||||
RUN make build-nogui vault-editor
|
COPY build.sh /build/
|
||||||
|
RUN bash build.sh
|
||||||
|
|
||||||
FROM debian:sid-slim
|
FROM ubuntu:jammy
|
||||||
LABEL maintainer="Simon Felding <sife@adm.ku.dk>"
|
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
||||||
|
|
||||||
EXPOSE 25/tcp
|
EXPOSE 25/tcp
|
||||||
EXPOSE 143/tcp
|
EXPOSE 143/tcp
|
||||||
@@ -26,8 +26,7 @@ RUN apt-get update \
|
|||||||
COPY gpgparams entrypoint.sh /protonmail/
|
COPY gpgparams entrypoint.sh /protonmail/
|
||||||
|
|
||||||
# Copy protonmail
|
# Copy protonmail
|
||||||
COPY --from=build /build/bridge /protonmail/
|
COPY --from=build /build/proton-bridge/bridge /protonmail/
|
||||||
COPY --from=build /build/proton-bridge /protonmail/
|
COPY --from=build /build/proton-bridge/proton-bridge /protonmail/
|
||||||
COPY --from=build /build/vault-editor /protonmail/
|
|
||||||
|
|
||||||
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]
|
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
VERSION=`cat VERSION`
|
||||||
|
|
||||||
|
# Clone new code
|
||||||
|
sed -i 's/127.0.0.1/0.0.0.0/g' internal/constants/constants.go
|
||||||
|
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user