5 FROM hexpm/elixir:${ELIXIR_VER}-erlang-${ERLANG_VER}-alpine-${ALPINE_VER} as build
11 RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
12 echo "import Config" > config/prod.secret.exs &&\
13 mix local.hex --force &&\
14 mix local.rebar --force &&\
15 mix deps.get --only prod &&\
17 mix release --path release
19 FROM alpine:${ALPINE_VER}
24 LABEL maintainer="ops@pleroma.social" \
25 org.opencontainers.image.title="pleroma" \
26 org.opencontainers.image.description="Pleroma for Docker" \
27 org.opencontainers.image.authors="ops@pleroma.social" \
28 org.opencontainers.image.vendor="pleroma.social" \
29 org.opencontainers.image.documentation="https://git.pleroma.social/pleroma/pleroma" \
30 org.opencontainers.image.licenses="AGPL-3.0" \
31 org.opencontainers.image.url="https://pleroma.social" \
32 org.opencontainers.image.revision=$VCS_REF \
33 org.opencontainers.image.created=$BUILD_DATE
36 ARG DATA=/var/lib/pleroma
39 apk add exiftool ffmpeg imagemagick libmagic ncurses postgresql-client &&\
40 adduser --system --shell /bin/false --home ${HOME} pleroma &&\
41 mkdir -p ${DATA}/uploads &&\
42 mkdir -p ${DATA}/static &&\
43 chown -R pleroma ${DATA} &&\
44 mkdir -p /etc/pleroma &&\
45 chown -R pleroma /etc/pleroma
49 COPY --from=build --chown=pleroma:0 /release ${HOME}
51 COPY ./config/docker.exs /etc/pleroma/config.exs
52 COPY ./docker-entrypoint.sh ${HOME}
56 ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]