-FROM node:8.11.3-alpine as node
-FROM ruby:2.4.4-alpine3.6
+FROM node:8.14.0-alpine as node
+FROM ruby:2.4.5-alpine3.8
LABEL maintainer="https://github.com/tootsuite/mastodon" \
description="Your self-hosted, globally interconnected microblogging community"
libidn-dev \
libressl \
libtool \
+ libxml2-dev \
+ libxslt-dev \
postgresql-dev \
protobuf-dev \
python \
imagemagick \
libidn \
libpq \
+ libxml2 \
+ libxslt \
protobuf \
tini \
tzdata \
COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
-RUN bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
+RUN bundle config build.nokogiri --use-system-libraries --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \
&& bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without test development \
&& yarn install --pure-lockfile --ignore-engines \
&& yarn cache clean
RUN chown -R mastodon:mastodon /mastodon
-VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs
+VOLUME /mastodon/public/system
USER mastodon
+RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
+
ENTRYPOINT ["/sbin/tini", "--"]