SearchController Test: Fix test
[akkoma] / Dockerfile
1 FROM elixir:1.9-alpine as build
2
3 COPY . .
4
5 ENV MIX_ENV=prod
6
7 RUN apk add git gcc g++ musl-dev make cmake file-dev &&\
8 echo "import Mix.Config" > config/prod.secret.exs &&\
9 mix local.hex --force &&\
10 mix local.rebar --force &&\
11 mix deps.get --only prod &&\
12 mkdir release &&\
13 mix release --path release
14
15 FROM alpine:3.11
16
17 ARG BUILD_DATE
18 ARG VCS_REF
19
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
31 ARG HOME=/opt/pleroma
32 ARG DATA=/var/lib/pleroma
33
34 RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
35 apk update &&\
36 apk add exiftool imagemagick ncurses postgresql-client &&\
37 adduser --system --shell /bin/false --home ${HOME} pleroma &&\
38 mkdir -p ${DATA}/uploads &&\
39 mkdir -p ${DATA}/static &&\
40 chown -R pleroma ${DATA} &&\
41 mkdir -p /etc/pleroma &&\
42 chown -R pleroma /etc/pleroma
43
44 USER pleroma
45
46 COPY --from=build --chown=pleroma:0 /release ${HOME}
47
48 COPY ./config/docker.exs /etc/pleroma/config.exs
49 COPY ./docker-entrypoint.sh ${HOME}
50
51 EXPOSE 4000
52
53 ENTRYPOINT ["/opt/pleroma/docker-entrypoint.sh"]