FROM ubuntu:latest ENV DEBIAN_FRONTEND=noninteractive RUN apt update;apt install -y git build-essential postgresql postgresql-contrib cmake libmagic-dev imagemagick ffmpeg libimage-exiftool-perl nginx certbot unzip libssl-dev automake autoconf libncurses5-dev curl sudo xsltproc libxml2-utils wx-common elixir erlang-dev erlang-nox RUN useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma;mkdir /opt/pleroma;chown -R pleroma:pleroma /opt/pleroma;chown -R pleroma:pleroma /var/lib/pleroma RUN su pleroma -s /bin/bash -lc 'git clone -b soapbox-v1.1.1 https://gitlab.com/soapbox-pub/soapbox-be /opt/pleroma' WORKDIR /var/lib/pleroma RUN su pleroma -s /bin/bash -lc 'git clone https://github.com/asdf-vm/asdf.git /var/lib/pleroma/.asdf' RUN su pleroma -s /bin/bash -lc 'echo ". /var/lib/pleroma/.asdf/asdf.sh" >> /var/lib/pleroma/.bashrc;echo ". /var/lib/pleroma/.asdf/completions/asdf.bash" >> /var/lib/pleroma/.bashrc' RUN su pleroma -s /bin/bash -lc 'PATH=$PATH:/var/lib/pleroma/.asdf/bin;asdf plugin-add erlang;asdf plugin-add elixir' RUN chown -R pleroma:pleroma /opt/pleroma;chown -R pleroma:pleroma /var/lib/pleroma RUN su pleroma -s /bin/bash -lc 'PATH=$PATH:/var/lib/pleroma/.asdf/bin;asdf install erlang 24.0;cat /var/lib/pleroma/.asdf/plugins/erlang/kerl-home/builds/asdf_24.0/otp_build_24.0.log' RUN su pleroma -s /bin/bash -lc 'cd /opt/pleroma;mix local.hex --force;mix local.rebar --force;mix deps.get;MIX_ENV=prod mix compile' COPY setup.sh /opt/ COPY start.sh /opt/ COPY crontab /opt/ COPY backup.sh /opt/ ADD default.conf /etc/nginx/conf.d/ CMD bash /opt/start.sh