postgresql-${PG_MAJOR} postgresql-client-${PG_MAJOR} \
postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \
language-pack-en cron anacron \
- psmisc rsyslog vim whois brotli libunwind-dev libicu-dev
+ psmisc rsyslog vim whois brotli libunwind-dev \
+ libtcmalloc-minimal4
RUN sed -i -e 's/start -q anacron/anacron -s/' /etc/cron.d/anacron
RUN sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf
RUN dpkg-divert --local --rename --add /sbin/initctl
locale-gen en_US &&\
apt-get install -y nodejs &&\
npm install -g uglify-js@"<3" &&\
- npm install -g svgo &&\
- npm install -g prettier
+ npm install -g svgo
ADD install-nginx /tmp/install-nginx
RUN /tmp/install-nginx
ADD install-pngquant /tmp/install-pngquant
RUN /tmp/install-pngquant
+# This tool allows us to disable huge page support for our current process
+# since the flag is preserved through forks and execs it can be used on any
+# process
+ADD thpoff.c /src/thpoff.c
+RUN gcc -o /usr/local/sbin/thpoff /src/thpoff.c && rm /src/thpoff.c
+
# clean up for docker squash
RUN rm -fr /usr/share/man &&\
rm -fr /usr/share/doc &&\
git remote set-branches --add origin tests-passed &&\
chown -R discourse:discourse /var/www/discourse &&\
cd /var/www/discourse &&\
- sudo -u discourse bundle install --deployment \
- --without test --without development &&\
+ sudo -u discourse bundle install --deployment --without test --without development &&\
find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +