2024-09-21 15:39:02 +02:00
|
|
|
# https://hub.docker.com/r/hexpm/elixir/tags
|
2023-04-24 20:03:59 -04:00
|
|
|
ARG ELIXIR_IMG=hexpm/elixir
|
2025-08-27 14:07:21 +04:00
|
|
|
ARG ELIXIR_VER=1.17.3
|
2026-09-08 22:35:31 +02:00
|
|
|
ARG ERLANG_VER=27.3.4.17
|
Dockerfile: update base images to fix problems with SSL handshakes
My instance has been having problems with push federation since
updating to v2.10.2, using the docker image. Posts are not reaching
their destination instance until some other interaction initiates a
fetch from source.
The logs contain lots of errors such as:
```
pleroma | 09:34:40.885 [notice] TLS :client: In state :wait_cert_cr at ssl_handshake.erl:2158 generated CLIENT ALERT: Fatal - Unsupported Certificate
pleroma | - {:key_usage_mismatch,
pleroma | {{:Extension, {2, 5, 29, 15}, true, [:keyCertSign, :cRLSign]},
pleroma | {:Extension, {2, 5, 29, 37}, false, [{1, 3, 6, 1, 5, 5, 7, 3, 1}]}}}
```
This erlang/OTP issue seems to be the same problem:
https://github.com/erlang/otp/issues/9208
The erlang version committed here was selected after discussion in the
merge request.
I have not noticed any federation problems with an image built from
this dockerfile.
2026-07-03 12:46:03 +03:00
|
|
|
ARG ALPINE_VER=3.23.5
|
2026-05-03 21:19:24 +04:00
|
|
|
ARG ELIXIR_TAG=${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER}
|
|
|
|
|
ARG ALPINE_IMG=alpine
|
2022-12-18 13:57:03 -05:00
|
|
|
|
2026-05-03 21:19:24 +04:00
|
|
|
FROM ${ELIXIR_IMG}:${ELIXIR_TAG} AS build
|
2019-07-31 19:35:14 -04:00
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
2019-08-02 22:28:48 -04:00
|
|
|
ENV MIX_ENV=prod
|
2023-12-12 11:36:34 +04:00
|
|
|
ENV VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS
|
2019-07-31 19:35:14 -04:00
|
|
|
|
2023-12-12 13:04:53 +04:00
|
|
|
RUN apk add git gcc g++ musl-dev make cmake file-dev vips-dev &&\
|
2022-09-02 22:35:08 +02:00
|
|
|
echo "import Config" > config/prod.secret.exs &&\
|
2019-07-31 19:35:14 -04:00
|
|
|
mix local.hex --force &&\
|
2019-08-02 22:40:31 -04:00
|
|
|
mix local.rebar --force &&\
|
2025-08-27 14:07:21 +04:00
|
|
|
mix deps.clean --all &&\
|
2019-08-02 22:40:31 -04:00
|
|
|
mix deps.get --only prod &&\
|
2019-07-31 19:35:14 -04:00
|
|
|
mkdir release &&\
|
|
|
|
|
mix release --path release
|
|
|
|
|
|
2026-05-03 21:19:24 +04:00
|
|
|
FROM ${ALPINE_IMG}:${ALPINE_VER}
|
2019-07-31 19:35:14 -04:00
|
|
|
|
2020-01-10 14:09:14 -05:00
|
|
|
ARG BUILD_DATE
|
|
|
|
|
ARG VCS_REF
|
|
|
|
|
|
|
|
|
|
LABEL maintainer="ops@pleroma.social" \
|
|
|
|
|
org.opencontainers.image.title="pleroma" \
|
|
|
|
|
org.opencontainers.image.description="Pleroma for Docker" \
|
|
|
|
|
org.opencontainers.image.authors="ops@pleroma.social" \
|
|
|
|
|
org.opencontainers.image.vendor="pleroma.social" \
|
|
|
|
|
org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
|
|
|
|
|
org.opencontainers.image.licenses="AGPL-3.0" \
|
|
|
|
|
org.opencontainers.image.url="https://pleroma.social" \
|
|
|
|
|
org.opencontainers.image.revision=$VCS_REF \
|
|
|
|
|
org.opencontainers.image.created=$BUILD_DATE
|
|
|
|
|
|
2019-08-02 22:28:48 -04:00
|
|
|
ARG HOME=/opt/pleroma
|
|
|
|
|
ARG DATA=/var/lib/pleroma
|
|
|
|
|
|
2021-12-17 18:00:29 -05:00
|
|
|
RUN apk update &&\
|
2022-11-09 13:45:57 -05:00
|
|
|
apk add exiftool ffmpeg vips libmagic ncurses postgresql-client &&\
|
2019-08-02 22:40:31 -04:00
|
|
|
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
2019-08-02 22:28:48 -04:00
|
|
|
mkdir -p ${DATA}/uploads &&\
|
|
|
|
|
mkdir -p ${DATA}/static &&\
|
|
|
|
|
chown -R pleroma ${DATA} &&\
|
2019-07-31 19:35:14 -04:00
|
|
|
mkdir -p /etc/pleroma &&\
|
|
|
|
|
chown -R pleroma /etc/pleroma
|
|
|
|
|
|
|
|
|
|
USER pleroma
|
|
|
|
|
|
2019-08-02 22:28:48 -04:00
|
|
|
COPY --from=build --chown=pleroma:0 /release ${HOME}
|
|
|
|
|
|
2023-08-05 13:10:35 +02:00
|
|
|
COPY --chown=pleroma --chmod=640 ./config/docker.exs /etc/pleroma/config.exs
|
2019-08-02 22:28:48 -04:00
|
|
|
COPY ./docker-entrypoint.sh ${HOME}
|
|
|
|
|
|
|
|
|
|
EXPOSE 4000
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]
|