Skip to content

Instantly share code, notes, and snippets.

@BertrandBordage
Created January 30, 2015 14:44
Show Gist options
  • Save BertrandBordage/03347673ea3e598bebd2 to your computer and use it in GitHub Desktop.
Save BertrandBordage/03347673ea3e598bebd2 to your computer and use it in GitHub Desktop.
Wagtail demo Dockerfile
# Build this docker image using: docker build -t wagtail-demo [path_to_the_folder_containing_this_file]
# Run it using: docker run -p 8000:8000 wagtail-demo
FROM ubuntu:14.10
MAINTAINER Bertrand Bordage, [email protected]
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install postgresql postgresql-server-dev-9.4 build-essential \
python2.7 python-pip python-dev python-opencv python-numpy \
&& apt-get -y build-dep pillow \
&& apt-get clean \
&& apt-get -y autoremove
ADD https://github.com/torchbox/wagtaildemo/archive/master.tar.gz /
RUN tar -xvf /master.tar.gz -C / && rm /master.tar.gz
WORKDIR /wagtaildemo-master/
RUN pip install -r requirements.txt
# Uncomment if you want the latest wagtail version
# RUN pip install https://github.com/torchbox/wagtail/archive/master.tar.gz
RUN sed -i 's/# Database administrative login by Unix domain socket/&\nlocal all postgres trust/' /etc/postgresql/9.4/main/pg_hba.conf
RUN service postgresql start \
&& psql -U postgres -c 'CREATE DATABASE wagtaildemo;' \
&& python manage.py migrate \
&& python manage.py load_initial_data
RUN echo 'WAGTAILIMAGES_FEATURE_DETECTION_ENABLED = True' >> wagtaildemo/settings/base.py
# Change your language code using this
# RUN sed -i "s/LANGUAGE_CODE = 'en-gb'/LANGUAGE_CODE = 'fr'/" wagtaildemo/settings/base.py
CMD service postgresql start && python manage.py runserver 0.0.0.0:8000
EXPOSE 8000
@martinkrung
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment