Skip to content

Instantly share code, notes, and snippets.

@dmitryrck
Last active April 15, 2017 17:24
Show Gist options
  • Save dmitryrck/4469bc7b7585ecc091bab5e86504ce05 to your computer and use it in GitHub Desktop.
Save dmitryrck/4469bc7b7585ecc091bab5e86504ce05 to your computer and use it in GitHub Desktop.
Zero to Up and Running a Project with Rails - Dockerfile with PostgreSQL
from ruby
env DEBIAN_FRONTEND=noninteractive \
NODE_VERSION=6.9.1
run sed -i '/deb-src/d' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y build-essential libpq-dev postgresql-client
run curl -sSL "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" | tar xfJ - -C /usr/local --strip-components=1 && \
npm install npm -g
run useradd -m -s /bin/bash -u 1000 railsuser
user railsuser
workdir /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment