<p><b>@pnorman</b> requested changes on this pull request.</p>

<ul>
<li>There should be a COPY or ADD instruction to get the local directory to the docker instance running the rails port. I'm not sure on the semantics of copy vs add, so I don't know which is preferred.</li>
<li>Because the <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md">configuration docs</a> require running a rails console the docker instructions should mention how to do that, as well as how to access the database directly or with psql, which are needed for <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md#populating-the-database">populating with osmosis</a> or general debugging.</li>
<li>I don't feel qualified to review the docker-compose stuff</li>
</ul><hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile</a>:</p>
<pre style='color:#555'>> +  libreadline-dev \
+  libpq-dev \
+  libxml2-dev \
+  imagemagick \
+  libmagickwand-dev \
+  postgresql-client \
+  nodejs \
+  file
+
+# Setup app location
+RUN mkdir -p /app
+WORKDIR /app
+
+# Install gems
+ADD Gemfile /app/Gemfile
+ADD Gemfile.lock /app/Gemfile.lock
</pre>
<p>You're adding <code>Gemfile</code> and <code>Gemfile.lock</code>, but shouldn't they come over when you bring <em>all</em> of the files from the local directory into docker?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile</a>:</p>
<pre style='color:#555'>> +# Install packages
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  build-essential \
+  ruby-dev \
+  libgdbm-dev \
+  libncurses5-dev \
+  libffi-dev \
+  libyaml-dev \
+  libreadline-dev \
+  libpq-dev \
+  libxml2-dev \
+  imagemagick \
+  libmagickwand-dev \
+  postgresql-client \
+  nodejs \
+  file
</pre>
<p>You should add <code>&& apt-get clean && rm -rf /var/lib/apt/lists/</code> to avoid including cache files in the docker image, inflating its size.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">INSTALL.md</a>:</p>
<pre style='color:#555'>> @@ -3,7 +3,7 @@
 These instructions are designed for setting up The Rails Port for development and testing.
 If you want to deploy the software for your own project, then see the notes at the end.
 
-You can install the software directly on your machine, which is the traditional and probably best-supported approach. However, there is an alternative which may be easier: Vagrant. This installs the software into a virtual machine, which makes it easier to get a consistent development environment and may avoid installation difficulties. For Vagrant instructions, see [VAGRANT.md](VAGRANT.md).
+You can install the software directly on your machine following the instructions below. Alternatively there are guides to use either [Vagrant](VAGRANT.md) or [Docker](DOCKER.md).
</pre>
<p>I would still call running software directly on your machine the traditional and probably best-supported approach.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">DOCKER.md</a>:</p>
<pre style='color:#555'>> +git clone --depth=1 https://github.com/openstreetmap/openstreetmap-website.git
+```
+
+### App configuration
+
+```
+cp config/example.application.yml config/application.yml
+```
+
+### Database
+
+```
+cp config/example.database.yml config/database.yml
+```
+
+Set `username` to postgres and `host` to db leave the password blank
</pre>
<p>Can this be automated, since we always know what the DB info is when running in docker?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile.postgres</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,9 @@
+FROM postgres:9.4
+
+ADD docker_postgres.sh docker-entrypoint-initdb.d/docker_postgres.sh
+ADD db/functions/ db/functions/
+ADD lib/quad_tile/ lib/quad_tile/
+
+RUN apt-get update && apt-get install -y make \
+  postgresql-server-dev-all \
+  build-essential
</pre>
<p>Add cleaning commands as in the <code>Dockerfile</code></p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile</a>:</p>
<pre style='color:#555'>> +  libpq-dev \
+  libxml2-dev \
+  imagemagick \
+  libmagickwand-dev \
+  postgresql-client \
+  nodejs \
+  file
+
+# Setup app location
+RUN mkdir -p /app
+WORKDIR /app
+
+# Install gems
+ADD Gemfile /app/Gemfile
+ADD Gemfile.lock /app/Gemfile.lock
+RUN bundle install
</pre>
<p>In other images I've seen a CMD set so you get a meaningful console when you access it, e.g. <code>CMD ["python2"]</code>. Is it possible to do the same here to get a console? <code>bundle exec rails console</code> is the command used in <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/CONFIGURE.md#managing-users"><code>CONFIGURE.md</code></a></p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,29 @@
+FROM ruby:2.3-slim
+MAINTAINER OpenStreetMap
+ENV REFRESHED_AT 2016-09-15
+
+# Install packages
+RUN apt-get update && apt-get install -y --no-install-recommends \
</pre>
<p>These are different than the listed <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/INSTALL.md#minimum-requirements">minimum requirements</a>. I can understand ruby being different since it's coming from a ruby image and the lack of postgresql, but are there reasons for the other differences?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">Dockerfile</a>:</p>
<pre style='color:#555'>> +ENV REFRESHED_AT 2016-09-15
+
+# Install packages
+RUN apt-get update && apt-get install -y --no-install-recommends \
+  build-essential \
+  ruby-dev \
+  libgdbm-dev \
+  libncurses5-dev \
+  libffi-dev \
+  libyaml-dev \
+  libreadline-dev \
+  libpq-dev \
+  libxml2-dev \
+  imagemagick \
+  libmagickwand-dev \
+  postgresql-client \
</pre>
<p>Is this needed for anything other than debugging? I'm okay with keeping it, but if it's only for debugging we should add a comment.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLexnX7BO5vYp9T8gaTVlDcWjN4O1ks5qqiLfgaJpZM4J-dnj">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLXC50-tLzj53NQVp4kZIjott2KEOks5qqiLfgaJpZM4J-dnj.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@pnorman reviewed #1290"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1290#pullrequestreview-292688"}}}</script>