# NAME: discourse/base
# VERSION: release
-FROM debian:buster-slim
+FROM ubuntu:16.04
ENV PG_MAJOR 10
ENV RUBY_ALLOCATOR /usr/lib/libjemalloc.so.1
RUN echo 2.0.`date +%Y%m%d` > /VERSION
-RUN apt update && apt install -y gnupg sudo curl
+RUN apt-get update && apt-get install -y lsb-release sudo curl
RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections
-RUN apt update && apt -y install fping
-RUN sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy && apt update || true"
-RUN apt -y install software-properties-common
+RUN echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main restricted universe" > /etc/apt/sources.list
+RUN echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main restricted universe" >> /etc/apt/sources.list
+RUN echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-security main restricted universe" >> /etc/apt/sources.list
+RUN apt-get update && apt-get -y install fping
+RUN sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy && apt-get update || true"
+RUN apt-get -y install software-properties-common
RUN apt-mark hold initscripts
-RUN apt -y upgrade
-
-RUN apt install -y locales locales-all
-ENV LC_ALL en_US.UTF-8
-ENV LANG en_US.UTF-8
-ENV LANGUAGE en_US.UTF-8
-
+RUN apt-get -y upgrade
RUN curl https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add -
-RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | \
+RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -sc)-pgdg main" | \
tee /etc/apt/sources.list.d/postgres.list
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | sudo bash -
-RUN apt -y update
-RUN apt -y install build-essential git wget \
+RUN apt-get -y update
+RUN apt-get -y install build-essential git wget \
libxslt-dev libcurl4-openssl-dev \
libssl-dev libyaml-dev libtool \
libxml2-dev gawk parallel \
postgresql-${PG_MAJOR} postgresql-client-${PG_MAJOR} \
postgresql-contrib-${PG_MAJOR} libpq-dev libreadline-dev \
- cron anacron \
+ language-pack-en cron anacron \
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
RUN sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl"
-RUN apt -y install openssh-server
+RUN apt-get -y install haproxy openssh-server
RUN cd / &&\
- apt -y install runit socat &&\
+ apt-get -y install runit monit socat &&\
mkdir -p /etc/runit/1.d &&\
- apt clean &&\
+ apt-get clean &&\
rm -f /etc/apt/apt.conf.d/40proxy &&\
locale-gen en_US &&\
- apt install -y nodejs &&\
+ apt-get install -y nodejs &&\
npm install -g uglify-js@"<3" &&\
npm install -g svgo
ADD install-nginx /tmp/install-nginx
RUN /tmp/install-nginx
-RUN apt -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng
+RUN apt-get -y install advancecomp jhead jpegoptim libjpeg-turbo-progs optipng
RUN mkdir /jemalloc-stable && cd /jemalloc-stable &&\
wget https://github.com/jemalloc/jemalloc/releases/download/3.6.0/jemalloc-3.6.0.tar.bz2 &&\