Skip to content

Instantly share code, notes, and snippets.

@wayanjimmy
Created April 18, 2018 00:58
Show Gist options
  • Save wayanjimmy/3a68080514f1dff8c1e7f6f5c8b322bc to your computer and use it in GitHub Desktop.
Save wayanjimmy/3a68080514f1dff8c1e7f6f5c8b322bc to your computer and use it in GitHub Desktop.
Rails Docker
version: "3"
services:
app:
build: .
command: bundle exec rails s -p 3001 -b '0.0.0.0'
environment:
RAILS_ENV: development
volumes:
- .:/workspace
ports:
- "3001:3001"
FROM ruby:2.5.1
ENV LANG C.UTF-8
RUN apt-get update -qq && apt-get install -y build-essential mysql-client
RUN mkdir /workspace
WORKDIR /workspace
ADD Gemfile /workspace/Gemfile
ADD Gemfile.lock /workspace/Gemfile.lock
RUN bundle install
ADD . /workspace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment