Files
protonmail-bridge/build/Dockerfile
T
GitHub Actions 2c262c0d0e
Build and Push Docker Container / build-and-push (push) Successful in 5m48s
change /build to /build/proton-bridge/ and add pass into build image and copy vault-editor into base image
2026-03-11 07:00:17 +01:00

43 lines
1.1 KiB
Docker

FROM golang:1.26 AS build
ARG VERSION
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libsecret-1-dev \
libfido2-dev \
libcbor-dev \
pass
# Build
ADD https://github.com/ProtonMail/proton-bridge.git#${VERSION} /build/proton-bridge/
WORKDIR /build/proton-bridge/
RUN sed -i 's/127.0.0.1/0.0.0.0/g' internal/constants/constants.go
RUN set -eux; \
make build-nogui vault-editor
FROM ubuntu:latest
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
EXPOSE 1025/tcp
EXPOSE 1143/tcp
# Install dependencies and protonmail bridge
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
pass libsecret-1-0 ca-certificates libfido2-1 \
dbus dbus-x11 gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/
# Copy protonmail
WORKDIR /usr/bin/
COPY --from=build /build/proton-bridge/bridge /usr/bin/
COPY --from=build /build/proton-bridge/proton-bridge /usr/bin/
COPY --from=build /build/proton-bridge/vault-editor /usr/bin/
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]