docker-pleroma/Dockerfile

29 lines
1.0 KiB
Docker
Raw Permalink Normal View History

2022-12-09 15:31:45 +00:00
FROM alpine
# Install packages
RUN awk 'NR==2' /etc/apk/repositories | sed 's/main/community/' | tee -a /etc/apk/repositories
RUN apk update && apk add curl exiftool ffmpeg imagemagick libmagic openssl1.1-compat postgresql14-client su-exec unzip
# Create user and directories
RUN addgroup pleroma && adduser --system -G pleroma --shell /bin/false --home /opt/pleroma pleroma
RUN mkdir -p /uploads
RUN mkdir -p /static
RUN mkdir -p /config
# Download and install Pleroma
RUN curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/stable/download?job=amd64-musl' -o /tmp/pleroma.zip
RUN unzip /tmp/pleroma.zip -d /tmp/
RUN mv /tmp/release/* /opt/pleroma
RUN rmdir /tmp/release && rm /tmp/pleroma.zip
# Add entrypoint script and base config
COPY ./docker-entrypoint.sh /usr/local/bin/
COPY ./config.dist.exs /opt/pleroma/
WORKDIR /opt/pleroma
ENV PLEROMA_CONFIG_PATH=/config/config.exs
VOLUME ["/uploads", "/static", "/config"]
EXPOSE 4000
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["/opt/pleroma/bin/pleroma", "start"]