about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 2b15381ec..eca90094c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -66,6 +66,9 @@ RUN apk add --no-cache -t build-dependencies \
  && rm -rf /tmp/*
 
 COPY Gemfile Gemfile.lock package.json yarn.lock .yarnclean /mastodon/
+COPY stack-fix.c /lib
+RUN gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so
+RUN rm /lib/stack-fix.c
 
 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 \
@@ -84,6 +87,7 @@ VOLUME /mastodon/public/system
 
 USER mastodon
 
+ENV LD_PRELOAD=/lib/stack-fix.so
 RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
 
 ENTRYPOINT ["/sbin/tini", "--"]