To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / extra / soundsoftware / dockertest @ 1569:26a4f99ec679

1 1569:26a4f99ec679 Chris
FROM ubuntu:16.04
2
MAINTAINER Chris Cannam <cannam@all-day-breakfast.com>
3
RUN apt-get update && \
4
    apt-get install -y \
5
    build-essential \
6
    git mercurial \
7
    curl wget rsync libcurl4-openssl-dev \
8
    logrotate cron \
9
    apache2 apache2-dev libapr1-dev libaprutil1-dev \
10
    ruby ruby-dev \
11
    postgresql libpq-dev \
12
    openjdk-9-jdk-headless \
13
    libapache2-mod-perl2 \
14
    imagemagick libmagickwand-dev graphviz \
15
    doxygen \
16
    exim4
17
RUN groupadd code
18
RUN useradd -g code -G www-data code
19
RUN gem install passenger -v 4.0.60 --no-rdoc --no-ri
20
RUN passenger-install-apache2-module --languages=ruby
21
COPY . /var/www/code
22
RUN chown -R code.www-data /var/www/code
23
RUN find /var/www/code -type d -exec chmod g+x \{\} \;
24
WORKDIR /var/www/code
25
RUN echo \
26
'production:\n\
27
  adapter: postgresql\n\
28
  database: code\n\
29
  host: localhost\n\
30
  username: code\n\
31
  password: "example"\n' | sed 's/\\n/\n/g' > config/database.yml
32
RUN gem install bundler
33
RUN bundle install
34
RUN ps auxw|grep postgres
35
RUN apt-get install sudo
36
RUN chown postgres postgres-dumpall
37
RUN /etc/init.d/postgresql start && sudo -u postgres psql -f postgres-dumpall postgres
38
#!/bin/bash
39
40
set -eu
41
42
dockerdir=./extra/soundsoftware/dockertest
43
if [ ! -d "$dockerdir" ]; then
44
    echo "Run this script from the root of a working copy of soundsoftware-site"
45
    exit 2
46
fi
47
48
dockertag="cannam/soundsoftware-site"
49
50
sudo docker build -t "$dockertag" -f "$dockerdir/Dockerfile" .