This commit is contained in:
Wonderfall 2019-03-11 22:06:00 +01:00
parent 91a10965ea
commit 6ecb9ab45b

View file

@ -1,6 +1,6 @@
FROM ruby:2.4.4-alpine3.7 FROM ruby:2.6.1-alpine3.9
ARG VERSION=v2.4.3 ARG VERSION=v2.7.4
ARG REPOSITORY=tootsuite/mastodon ARG REPOSITORY=tootsuite/mastodon
ARG LIBICONV_VERSION=1.15 ARG LIBICONV_VERSION=1.15
@ -24,10 +24,12 @@ RUN apk -U upgrade \
icu-libs \ icu-libs \
imagemagick \ imagemagick \
libidn \ libidn \
libxml2 \
libxslt \
libpq \ libpq \
libressl \
nodejs-npm \
nodejs \ nodejs \
npm \
openssl \
protobuf \ protobuf \
s6 \ s6 \
su-exec \ su-exec \
@ -39,6 +41,8 @@ RUN apk -U upgrade \
icu-dev \ icu-dev \
libidn-dev \ libidn-dev \
libtool \ libtool \
libxml2-dev \
libxslt-dev \
postgresql-dev \ postgresql-dev \
protobuf-dev \ protobuf-dev \
python \ python \
@ -58,12 +62,12 @@ RUN apk -U upgrade \
# Install Mastodon # Install Mastodon
&& cd /mastodon \ && cd /mastodon \
&& wget -qO- https://github.com/${REPOSITORY}/archive/${VERSION}.tar.gz | tar xz --strip 1 \ && wget -qO- https://github.com/${REPOSITORY}/archive/${VERSION}.tar.gz | tar xz --strip 1 \
&& bundle config build.nokogiri --with-iconv-lib=/usr/local/lib --with-iconv-include=/usr/local/include \ && 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 --clean --no-cache --without test development \ && bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --clean --no-cache --without test development \
&& yarn --ignore-optional --pure-lockfile \ && yarn install --pure-lockfile --ignore-engines \
# Precompile Mastodon assets # Precompile Mastodon assets
&& SECRET_KEY_BASE=$(bundle exec rake secret) OTP_SECRET=$(bundle exec rake secret) SMTP_FROM_ADDRESS= bundle exec rake assets:precompile \ && OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile \
# Clean # Clean
&& npm -g --force cache clean && yarn cache clean \ && npm -g --force cache clean && yarn cache clean \