From 025a598b03d6fec4bddf6f0c890c9a0e3c034ead Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Jun 2014 11:21:58 +1000 Subject: [PATCH] UPGRADE: base image to 14.04 --- image/base/Dockerfile | 8 +++----- image/base_21/Dockerfile | 15 +++++++++------ image/base_21/runit-1 | 3 +++ image/base_21/runit-1.d-cleanup-pids | 3 +++ image/base_21/runit-2 | 2 ++ image/discourse/Dockerfile | 2 +- image/discourse_21/Dockerfile | 2 +- launcher | 2 +- templates/sshd.template.yml | 7 ++++++- 9 files changed, 29 insertions(+), 15 deletions(-) create mode 100755 image/base_21/runit-1 create mode 100755 image/base_21/runit-1.d-cleanup-pids create mode 100755 image/base_21/runit-2 diff --git a/image/base/Dockerfile b/image/base/Dockerfile index 604fae5..6120880 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -1,10 +1,8 @@ -# DOCKER-VERSION 0.6.7 : samsaffron/discourse_base - # Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014) # When new LTS ships we can upgrade # VERSION 0.2.2 -FROM ubuntu:12.04 +FROM ubuntu:14.04 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" @@ -12,7 +10,7 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ apt-get -y install fping &&\ sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy || true" &&\ apt-get -y update &&\ - apt-get -y install python-software-properties &&\ + apt-get -y install software-properties-common &&\ add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\ add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main universe" &&\ apt-get -y update &&\ @@ -21,7 +19,7 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ add-apt-repository -y ppa:rwky/redis &&\ add-apt-repository -y ppa:nginx/stable &&\ apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\ - echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | \ tee /etc/apt/sources.list.d/postgres.list &&\ apt-get -y update &&\ apt-get -y install build-essential git curl wget \ diff --git a/image/base_21/Dockerfile b/image/base_21/Dockerfile index 49fdf44..b4adb32 100644 --- a/image/base_21/Dockerfile +++ b/image/base_21/Dockerfile @@ -1,10 +1,8 @@ -# DOCKER-VERSION 0.6.7 : samsaffron/discourse_base - # Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014) # When new LTS ships we can upgrade # VERSION 0.2.0 -FROM ubuntu:12.04 +FROM ubuntu:14.04 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" @@ -12,7 +10,7 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ apt-get -y install fping &&\ sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy || true" &&\ apt-get -y update &&\ - apt-get -y install python-software-properties &&\ + apt-get -y install software-properties-common &&\ add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\ add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main universe" &&\ apt-get -y update &&\ @@ -21,7 +19,7 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ add-apt-repository -y ppa:rwky/redis &&\ add-apt-repository -y ppa:nginx/stable &&\ apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\ - echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | \ + echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | \ tee /etc/apt/sources.list.d/postgres.list &&\ apt-get -y update &&\ apt-get -y install build-essential git curl wget \ @@ -56,4 +54,9 @@ RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ apt-get -y install runit monit socat &&\ apt-get clean &&\ rm -f /etc/apt/apt.conf.d/40proxy &&\ - locale-gen en_US + locale-gen en_US &&\ + mkdir -p /etc/runit/1.d + +ADD runit-1 /etc/runit/1 +ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids +ADD runit-2 /etc/runit/2 diff --git a/image/base_21/runit-1 b/image/base_21/runit-1 new file mode 100755 index 0000000..e9c842e --- /dev/null +++ b/image/base_21/runit-1 @@ -0,0 +1,3 @@ +#!/bin/bash + +/bin/run-parts --verbose --exit-on-error /etc/runit/1.d diff --git a/image/base_21/runit-1.d-cleanup-pids b/image/base_21/runit-1.d-cleanup-pids new file mode 100755 index 0000000..cf5c3da --- /dev/null +++ b/image/base_21/runit-1.d-cleanup-pids @@ -0,0 +1,3 @@ +#!/bin/bash +/bin/echo "Cleaning stale PID files" +/bin/rm -f /var/run/*.pid diff --git a/image/base_21/runit-2 b/image/base_21/runit-2 new file mode 100755 index 0000000..b3ec10e --- /dev/null +++ b/image/base_21/runit-2 @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/runsvdir -P /etc/service diff --git a/image/discourse/Dockerfile b/image/discourse/Dockerfile index f877131..6aba6fb 100644 --- a/image/discourse/Dockerfile +++ b/image/discourse/Dockerfile @@ -1,4 +1,4 @@ -FROM samsaffron/discourse_base:0.2.2 +FROM samsaffron/discourse_base:0.2.3 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/image/discourse_21/Dockerfile b/image/discourse_21/Dockerfile index 666cb9e..a0735a2 100644 --- a/image/discourse_21/Dockerfile +++ b/image/discourse_21/Dockerfile @@ -1,4 +1,4 @@ -FROM samsaffron/discourse_base_21:2.1.2 +FROM samsaffron/discourse_base_21:2.1.2.1 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" diff --git a/launcher b/launcher index b8e0a46..d4aff1c 100755 --- a/launcher +++ b/launcher @@ -13,7 +13,7 @@ config_file=containers/"$config".yml cidfile=cids/"$config".cid cidbootstrap=cids/"$config"_boostrap.cid local_discourse=local_discourse -image=samsaffron/discourse:0.2.2 +image=samsaffron/discourse:0.2.3 docker_path=`which docker.io || which docker` docker_ip=`/sbin/ifconfig | \ diff --git a/templates/sshd.template.yml b/templates/sshd.template.yml index 888e834..9f365c4 100644 --- a/templates/sshd.template.yml +++ b/templates/sshd.template.yml @@ -9,6 +9,12 @@ env: run: + - replace: + filename: /etc/pam.d/sshd + from: "session required pam_loginuid.so" + to: "" + + - file: path: /etc/service/sshd/run chmod: "+x" @@ -27,7 +33,6 @@ run: - chmod 640 /root/.ssh/authorized_keys - rm /etc/update-motd.d/00-header - rm /etc/update-motd.d/10-help-text - - rm /etc/update-motd.d/99-footer - rm /etc/legal - file: path: /etc/update-motd.d/00-discourse -- 2.25.1