Commit da59432a authored by Michiel de Jong's avatar Michiel de Jong

Work on known-git, owncloud-git, and mediagoblin images

parent a362e321
# Start off at Ubuntu 13.04 # based on Nate Jones's https://github.com/mediatemple/federated_services_oscon_2013/tree/master/docker/mediagoblin
from debian:jessie FROM ubuntu
# based on https://github.com/mediatemple/federated_services_oscon_2013/tree/master/docker/mediagoblin
# Install needed OS packages # Install needed OS packages
run apt-get update RUN apt-get update \
run apt-get install --force-yes -y git-core python python-dev python-lxml python-imaging python-virtualenv python-psycopg2 build-essential postgresql postgresql-client sudo supervisor openssh-server && apt-get -yq install \
build-essential \
git-core \
openssh-server \
python \
python-dev \
python-lxml \
python-imaging \
python-virtualenv \
python-psycopg2 \
postgresql \
postgresql-client \
sudo \
supervisor \
&& rm -rf /var/lib/apt/lists/*
# Make a home for mediagoblin # Make a home for mediagoblin
run mkdir /srv/mediagoblin RUN mkdir /srv/mediagoblin
# Setup the environment: clone the mediagoblin repo, install python packages # Setup the environment: clone the mediagoblin repo, install python packages
add ./env_setup.sh /srv/mediagoblin/env_setup.sh COPY ./env_setup.sh /srv/mediagoblin/env_setup.sh
run bash -c "cd /srv/mediagoblin; chmod +x env_setup.sh" RUN bash -c "cd /srv/mediagoblin; chmod +x env_setup.sh"
run bash -c "cd /srv/mediagoblin; ./env_setup.sh" RUN bash -c "cd /srv/mediagoblin; ./env_setup.sh"
# Patch the email code so that test emails are logged # Patch the email code so that test emails are logged
#add ./email_logging.patch /srv/mediagoblin/email_logging.patch COPY ./email_logging.patch /srv/mediagoblin/email_logging.patch
#run bash -c "cd /srv/mediagoblin/mediagoblin; patch -p0 < ../email_logging.patch" RUN bash -c "cd /srv/mediagoblin/mediagoblin; patch -p0 < ../email_logging.patch"
# Set up the mediagoblin database in postgresql # Set up the mediagoblin database in postgresql
add ./db_setup.sh /srv/mediagoblin/db_setup.sh COPY ./db_setup.sh /srv/mediagoblin/db_setup.sh
run bash -c "cd /srv/mediagoblin; chmod +x db_setup.sh" RUN bash -c "cd /srv/mediagoblin; chmod +x db_setup.sh"
run bash -c "cd /srv/mediagoblin; ./db_setup.sh" RUN bash -c "cd /srv/mediagoblin; ./db_setup.sh"
# Configure the database connection and create the initial tables # Configure the database connection and create the initial tables
add ./mediagoblin_local.ini /srv/mediagoblin/mediagoblin/mediagoblin_local.ini COPY ./mediagoblin_local.ini /srv/mediagoblin/mediagoblin/mediagoblin_local.ini
add ./db_update.sh /srv/mediagoblin/db_update.sh COPY ./db_update.sh /srv/mediagoblin/db_update.sh
run bash -c "cd /srv/mediagoblin; chmod +x db_update.sh" RUN bash -c "cd /srv/mediagoblin; chmod +x db_update.sh"
run bash -c "cd /srv/mediagoblin; cd mediagoblin; ../db_update.sh" RUN bash -c "cd /srv/mediagoblin; cd mediagoblin; ../db_update.sh"
# Insert the script to run mediagoblin # Insert the script to run mediagoblin
add ./run_app.sh /srv/mediagoblin/run_app.sh COPY ./run_app.sh /srv/mediagoblin/run_app.sh
run bash -c "cd /srv/mediagoblin; chmod +x run_app.sh" RUN bash -c "cd /srv/mediagoblin; chmod +x run_app.sh"
# Create a couple of required directories # Create a couple of required directories
run mkdir -p /var/run/sshd RUN mkdir -p /var/run/sshd
run mkdir -p /var/log/supervisor RUN mkdir -p /var/log/supervisor
run locale-gen en_US en_US.UTF-8 RUN locale-gen en_US en_US.UTF-8
# Configure supervisord # Configure supervisord
add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Expose the ports and set the command to run # Expose the ports and set the command to run
expose 22 EXPOSE 6543
expose 6543 CMD ["/usr/bin/supervisord", "-n"]
cmd ["/usr/bin/supervisord", "-n"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment