protonmail-bridge-nextcoud-.../build/Dockerfile

41 lines
1.0 KiB
Docker
Raw Normal View History

2024-09-09 21:45:48 +00:00
FROM golang:1.23 AS build
2020-06-01 13:51:24 +00:00
# Install dependencies
2024-09-09 21:45:48 +00:00
# RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get -y --no-install-recommends install \
libc6 \
socat \
pass \
ca-certificates \
wget \
binutils \
xz-utils \
2024-09-30 03:27:17 +00:00
libsecret-1-dev \
2024-09-09 21:45:48 +00:00
libgl1
2020-06-01 13:51:24 +00:00
# Build
WORKDIR /build/
COPY build.sh VERSION /build/
2024-09-09 21:45:48 +00:00
RUN --mount=type=cache,target=/root/.cache/go-build bash build.sh
2020-06-01 13:51:24 +00:00
2024-09-09 21:45:48 +00:00
FROM ubuntu:noble
2020-06-01 13:51:24 +00:00
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
EXPOSE 25/tcp
EXPOSE 143/tcp
# Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/
# Copy protonmail
COPY --from=build /build/proton-bridge/bridge /protonmail/
COPY --from=build /build/proton-bridge/proton-bridge /protonmail/
2020-06-01 13:51:24 +00:00
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]