improve build readability and speed

This commit is contained in:
Simon Ungar Felding 2025-02-17 18:03:25 +01:00
parent 540ba69528
commit db5aa2dc8d
11 changed files with 217 additions and 159 deletions

View file

@ -2,12 +2,12 @@
FROM debian:sid-slim AS build
# Install dependencies
RUN apt-get update && apt-get install -y git golang build-essential libsecret-1-dev
RUN apt-get update && apt-get install -y golang build-essential libsecret-1-dev
# Build
ADD https://github.com/ProtonMail/proton-bridge.git#{version} /build/
WORKDIR /build/
COPY build.sh VERSION /build/
RUN bash build.sh
RUN make build-nogui vault-editor
FROM debian:sid-slim
LABEL maintainer="Simon Felding <sife@adm.ku.dk>"
@ -24,8 +24,8 @@ 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/
COPY --from=build /build/proton-bridge/vault-editor /protonmail/
COPY --from=build /build/bridge /protonmail/
COPY --from=build /build/proton-bridge /protonmail/
COPY --from=build /build/vault-editor /protonmail/
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]

View file

@ -1 +0,0 @@
3.19.0

View file

@ -1,13 +0,0 @@
#!/bin/bash
set -ex
VERSION=`cat VERSION`
# Clone new code
git clone https://github.com/ProtonMail/proton-bridge.git
cd proton-bridge
git checkout v$VERSION
# Build
make build-nogui vault-editor