Created
April 18, 2018 00:58
-
-
Save wayanjimmy/3a68080514f1dff8c1e7f6f5c8b322bc to your computer and use it in GitHub Desktop.
Rails Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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