discourse-docker/Dockerfile

75 lines
2.1 KiB
Docker
Raw Normal View History

2020-03-05 05:19:37 +00:00
# focal 2020.01 dev
FROM ubuntu@sha256:d050ed7278c16ff627e4a70d7d353f1a2ec74d8a0b66e5a865356d92f5f6d87b
ENV DEBIAN_FRONTEND noninteractive
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
RUN echo "deb $UBUNTU_MIRROR focal main universe restricted multiverse" > /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-updates main universe restricted multiverse" >> /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> /etc/apt/sources.list.new && \
echo "deb $UBUNTU_MIRROR focal-backports main universe restricted multiverse" >> /etc/apt/sources.list.new && \
mv /etc/apt/sources.list.new /etc/apt/sources.list
# we only install essential system packages here
ARG SYSTEM_PACKAGES="build-essential ca-certificates git golang rsync runit software-properties-common"
RUN \
apt update && \
apt -y upgrade && \
apt -y install $SYSTEM_PACKAGES && \
go get -v -u github.com/peterbourgon/runsvinit && \
cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \
rm -r /root/go
COPY ./root /tmp/rootoverlay
RUN rsync -avP /tmp/rootoverlay/ / && \
rm -rf /tmp/rootoverlay
# prereqs for discourse
RUN apt update && \
apt -y install \
advancecomp \
autoconf \
automake \
bison \
curl \
debconf-utils \
expect \
gawk \
gifsicle \
git-core \
gnupg2 \
imagemagick \
jhead \
jpegoptim \
libcurl4-openssl-dev \
libffi-dev \
libgdbm-dev \
libjpeg-turbo-progs \
libncurses5-dev \
libpcre3 \
libpcre3-dev \
libreadline6-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libyaml-dev \
openssl \
optipng \
pngcrush \
pngquant \
python3-software-properties \
redis-server \
ruby-full \
sqlite3 \
sudo \
vim \
zlib1g-dev
COPY ./run.sh /tmp/run.sh
RUN /bin/bash /tmp/run.sh && rm /tmp/run.sh
CMD ["/usr/local/sbin/runsvinit"]