ADD file:c644b15c170e2ca46176a566910d40a21dce66518ed8fdfd34ebcf0e9dc90c55 in / |
CMD ["/bin/sh"] |
ENV OTP_VERSION=27.0.1 REBAR3_VERSION=3.23.0 |
LABEL org.opencontainers.image.version=27.0.1 |
RUN /bin/sh -c set -xe && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" && OTP_DOWNLOAD_SHA256="47d96bb7044cf44bca886213fa828ef82457a911b7622c453d9b3c615b6f68ab" && REBAR3_DOWNLOAD_SHA256="00646b692762ffd340560e8f16486dbda840e1546749ee5a7f58feeb77e7b516" && 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 # buildkit |
CMD ["erl"] |
ENV ELIXIR_VERSION=v1.17.2 LANG=C.UTF-8 |
RUN /bin/sh -c set -xe && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" && ELIXIR_DOWNLOAD_SHA256="7bb8e6414b77c1707f39f620a2ad54f68d64846d663ec78069536854247fb1ab" && 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 && find /usr/local/src/elixir/ -type f -not -regex "/usr/local/src/elixir/lib/[^\/]*/lib.*" -exec rm -rf {} + && find /usr/local/src/elixir/ -type d -depth -empty -delete && apk del .build-deps # buildkit |
CMD ["iex"] |
ARG PLEROMA_VER |
ARG PLEROMA_VER UID |
ARG GID PLEROMA_VER UID |
ENV MIX_ENV=prod |
|3 GID=911 PLEROMA_VER=develop UID=911 /bin/sh -c echo "http://nl.alpinelinux.org/alpine/latest-stable/main" >> /etc/apk/repositories && apk update && apk add git gcc g++ musl-dev make cmake file-dev exiftool imagemagick libmagic ncurses postgresql-client ffmpeg openssl-dev |
|3 GID=911 PLEROMA_VER=develop 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=develop 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=develop UID=911 /bin/sh -c git clone -b develop https://git.pleroma.social/pleroma/pleroma.git /pleroma && git checkout ${PLEROMA_VER} |
|4 DATA=/var/lib/pleroma GID=911 PLEROMA_VER=develop 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:5df669bcdddca56d767d04aa83d9de5a9f8c0b525094bee93d5127008509c8e7 in /etc/pleroma/config.exs |
EXPOSE 4000 |
ENTRYPOINT ["/pleroma/docker-entrypoint.sh"] |