ADD file:76d829bbce3dd420a8419919b0916c0fda917011d1e6752ca5b9e53d5ca890a6 in / |
CMD ["/bin/sh"] |
ENV OTP_VERSION=23.3.4.19 REBAR3_VERSION=3.20.0 |
LABEL org.opencontainers.image.version=23.3.4.19 |
/bin/sh -c set -xe && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" && OTP_DOWNLOAD_SHA256="2b3b5ad2942c7f643cdf7e5b7af57f007e404f44caaa0a8ab288f4c3de23552f" && REBAR3_DOWNLOAD_SHA256="53ed7f294a8b8fb4d7d75988c69194943831c104d39832a1fa30307b1a8593de" && apk add --no-cache --virtual .fetch-deps curl ca-certificates && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - && apk add --no-cache --virtual .build-deps dpkg-dev dpkg gcc g++ libc-dev linux-headers make autoconf ncurses-dev openssl-dev unixodbc-dev lksctp-tools-dev tar && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" && mkdir -vp $ERL_TOP && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 && rm otp-src.tar.gz && ( cd $ERL_TOP && ./otp_build autoconf && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" && ./configure --build="$gnuArch" && make -j$(getconf _NPROCESSORS_ONLN) && make install ) && rm -rf $ERL_TOP && find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|doc\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf && find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true && find /usr/local -name src | xargs -r find | xargs rmdir -vp || true && scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all && scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded && runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )" && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" && echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - && mkdir -p /usr/src/rebar3-src && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 && rm rebar3-src.tar.gz && cd /usr/src/rebar3-src && HOME=$PWD ./bootstrap && install -v ./rebar3 /usr/local/bin/ && rm -rf /usr/src/rebar3-src && apk add --virtual .erlang-rundeps $runDeps lksctp-tools ca-certificates && apk del .fetch-deps .build-deps |
CMD ["erl"] |
ENV ELIXIR_VERSION=v1.11.4 LANG=C.UTF-8 |
/bin/sh -c set -xe && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" && ELIXIR_DOWNLOAD_SHA256="85c7118a0db6007507313db5bddf370216d9394ed7911fe80f21e2fbf7f54d29" && buildDeps=' ca-certificates curl make ' && apk add --no-cache --virtual .build-deps $buildDeps && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - && mkdir -p /usr/local/src/elixir && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz && rm elixir-src.tar.gz && cd /usr/local/src/elixir && make install clean && apk del .build-deps |
CMD ["iex"] |
ARG PLEROMA_VER |
ARG PLEROMA_VER UID |
ARG GID PLEROMA_VER UID |
ENV MIX_ENV=prod |
|3 GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c apk update && apk add git gcc g++ musl-dev make cmake file-dev exiftool imagemagick libmagic ncurses postgresql-client ffmpeg |
|3 GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c addgroup -g ${GID} pleroma && adduser -h /pleroma -s /bin/false -D -G pleroma -u ${UID} pleroma |
ARG DATA GID PLEROMA_VER UID |
|4 DATA=/var/lib/pleroma GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c mkdir -p /etc/pleroma && chown -R pleroma /etc/pleroma && mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static && chown -R pleroma ${DATA} |
USER pleroma |
WORKDIR /pleroma |
|4 DATA=/var/lib/pleroma GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c git clone -b ${PLEROMA_VER} https://git.pleroma.social/pleroma/pleroma.git /pleroma && git checkout ${PLEROMA_VER} |
|4 DATA=/var/lib/pleroma GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c echo "import Mix.Config" > config/prod.secret.exs && mix local.hex --force && mix local.rebar --force && mix deps.get --only prod && mkdir release && mix release --path /pleroma |
COPY file:f40e78ac361c9f51806499a6947b1ba5403ca8b0060f9876c0f71cc04dbcecc5 in /etc/pleroma/config.exs |
USER root |
|4 DATA=/var/lib/pleroma GID=911 PLEROMA_VER=stable UID=911 /bin/sh -c chmod o-rwx /etc/pleroma/config.exs |
USER pleroma |
EXPOSE 4000 |
ENTRYPOINT ["/pleroma/docker-entrypoint.sh"] |