Skip to content

Instantly share code, notes, and snippets.

@namachan10777
Created February 9, 2021 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save namachan10777/81eeed43ac4e9d8948701255c720f84e to your computer and use it in GitHub Desktop.
Save namachan10777/81eeed43ac4e9d8948701255c720f84e to your computer and use it in GitHub Desktop.
Pleroma docker
FROM elixir:1.11-alpine
LABEL maintainer "Masaki Nakano<namachan10777@gmail.com>"
WORKDIR /pleroma
RUN apk update \
&& apk upgrade \
&& apk add git make gcc musl-dev cmake g++ file-dev \
&& rm -rf /tmp/* /var/cache/apk/* \
&& mkdir /pleroma/uploads
ENV MIX_ENV prod
RUN addgroup pleroma
RUN adduser -S -s /bin/false -h /opt/pleroma -H -G pleroma pleroma
RUN mkdir -p /opt/pleroma && \
chown -R pleroma:pleroma /opt/pleroma
USER pleroma
RUN git clone --depth=1 -b develop https://git.pleroma.social/pleroma/pleroma.git /opt/pleroma
WORKDIR /opt/pleroma
ENV MIX_ENV dev
RUN mix local.hex --force
RUN mix deps.get
RUN mix local.rebar --force
RUN sed -ie 's/LDLIBS = -lpthread -lei -lm -lmagic/LDLIBS = -lpthread/' deps/majic/Makefile
RUN sed -ie '12iLDLIBS += -lei -lm -lmagic' deps/majic/Makefile
RUN cat deps/majic/Makefile
RUN mix pleroma.instance gen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment