Merge branch 'master' of github.com:pfaffman/discourse_docker
[discourse_docker.git] / image / discourse_dev / Dockerfile
index 69fa17df77f9c19a87a969dcdfd53717487ad50c..8e106da1023d23b31bbb49eb9fdcd447a61cfd8f 100644 (file)
@@ -1,13 +1,15 @@
 # NAME:     discourse/discourse_dev
-# VERSION:  1.3.8
-FROM discourse/base:1.3.8
+# VERSION:  release
+FROM discourse/base:release
 
 MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
 
-# Create discourse user and /var/www location for both
-# discourse and dev images.
-RUN useradd discourse -s /bin/bash -m -U &&\
-    mkdir -p /var/www
+# Install for mailcatcher gem
+RUN apt-get update && apt-get install -y libsqlite3-dev \
+    && gem install mailcatcher && rm -rf /var/lib/apt/lists/*
+
+# Remove the code added on base image
+RUN rm -rf /var/www/*
 
 # Give discourse user no-passwd sudo permissions (for bundle install)
 ADD sudoers.discourse /etc/sudoers.d/discourse
@@ -25,6 +27,10 @@ ENV LC_ALL en_US.UTF-8
 ADD postgres.template.yml /pups/postgres.yml
 RUN LANG=en_US.UTF-8 /pups/bin/pups /pups/postgres.yml
 
+# add dev databases
+ADD postgres_dev.template.yml /pups/postgres_dev.yml
+RUN /pups/bin/pups /pups/postgres_dev.yml
+
 # move default postgres_data out of the way
 RUN mv /shared/postgres_data /shared/postgres_data_orig