logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

Dockerfile (1772B)


  1. # https://hub.docker.com/r/hexpm/elixir/tags
  2. ARG ELIXIR_IMG=hexpm/elixir
  3. ARG ELIXIR_VER=1.14.5
  4. ARG ERLANG_VER=25.3.2.14
  5. ARG ALPINE_VER=3.17.9
  6. FROM ${ELIXIR_IMG}:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} as build
  7. COPY . .
  8. ENV MIX_ENV=prod
  9. ENV VIX_COMPILATION_MODE=PLATFORM_PROVIDED_LIBVIPS
  10. RUN apk add git gcc g++ musl-dev make cmake file-dev vips-dev &&\
  11. echo "import Config" > config/prod.secret.exs &&\
  12. mix local.hex --force &&\
  13. mix local.rebar --force &&\
  14. mix deps.get --only prod &&\
  15. mkdir release &&\
  16. mix release --path release
  17. FROM alpine:${ALPINE_VER}
  18. ARG BUILD_DATE
  19. ARG VCS_REF
  20. LABEL maintainer="ops@pleroma.social" \
  21. org.opencontainers.image.title="pleroma" \
  22. org.opencontainers.image.description="Pleroma for Docker" \
  23. org.opencontainers.image.authors="ops@pleroma.social" \
  24. org.opencontainers.image.vendor="pleroma.social" \
  25. org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
  26. org.opencontainers.image.licenses="AGPL-3.0" \
  27. org.opencontainers.image.url="https://pleroma.social" \
  28. org.opencontainers.image.revision=$VCS_REF \
  29. org.opencontainers.image.created=$BUILD_DATE
  30. ARG HOME=/opt/pleroma
  31. ARG DATA=/var/lib/pleroma
  32. RUN apk update &&\
  33. apk add exiftool ffmpeg vips libmagic ncurses postgresql-client &&\
  34. adduser --system --shell /bin/false --home ${HOME} pleroma &&\
  35. mkdir -p ${DATA}/uploads &&\
  36. mkdir -p ${DATA}/static &&\
  37. chown -R pleroma ${DATA} &&\
  38. mkdir -p /etc/pleroma &&\
  39. chown -R pleroma /etc/pleroma
  40. USER pleroma
  41. COPY --from=build --chown=pleroma:0 /release ${HOME}
  42. COPY --chown=pleroma --chmod=640 ./config/docker.exs /etc/pleroma/config.exs
  43. COPY ./docker-entrypoint.sh ${HOME}
  44. EXPOSE 4000
  45. ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]