From fdcc232bc2f1b83beb32717dea87cf072d0d7f87 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 4 Mar 2020 23:56:37 -0800 Subject: [PATCH] finally builds --- Dockerfile | 16 +++++++++++++--- install.sh | 23 +++++++++++++++-------- root/etc/service/discourse/run | 3 +++ 3 files changed, 31 insertions(+), 11 deletions(-) create mode 100644 root/etc/service/discourse/run diff --git a/Dockerfile b/Dockerfile index 64512bb..bda504e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,14 +19,24 @@ echo "deb $UBUNTU_MIRROR focal-security main universe restricted multiverse" >> 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="locales build-essential ca-certificates git golang rsync runit software-properties-common" +ARG ADDITIONAL_PKGS="" RUN \ apt update && \ apt -y upgrade && \ - apt -y install $SYSTEM_PACKAGES && \ + apt -y install \ + $ADDITIONAL_PKGS \ + build-essential \ + ca-certificates \ + daemontools \ + git \ + golang \ + locales \ + rsync \ + runit \ + software-properties-common \ + && \ go get -v -u git.eeqj.de/sneak/runsvinit && \ cp /root/go/bin/runsvinit /usr/local/sbin/runsvinit && \ rm -r /root/go && \ diff --git a/install.sh b/install.sh index a419c95..f72d7f3 100644 --- a/install.sh +++ b/install.sh @@ -31,27 +31,34 @@ apt-get -yqq update apt install -y postgresql-common echo -e "\n" | sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh apt-get -yqq update -apt-get install -y postgresql-client-12 +apt-get install -y postgresql-client-12 libpq-dev + +sudo -H -u discourse bash --login <> ~/.gemrc -source $HOME/.rvm/scripts/rvm +source ~/.rvm/scripts/rvm rvm install $RUBY_VERSION rvm --default use $RUBY_VERSION gem install bundler mailcatcher rake -curl -sSL https://get.rvm.io | bash -source $HOME/.nvm/nvm.sh +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash +source ~/.nvm/nvm.sh nvm install $NODE_VERSION nvm alias default $NODE_VERSION npm install -g svgo -cd $HOME +cd ~/app bundle install -" +EOF + + diff --git a/root/etc/service/discourse/run b/root/etc/service/discourse/run new file mode 100644 index 0000000..19a48fc --- /dev/null +++ b/root/etc/service/discourse/run @@ -0,0 +1,3 @@ +#!/bin/bash + +sleep 60