Created
September 9, 2016 02:34
-
-
Save take4/492511c0afa2543538c5c5938f5124b5 to your computer and use it in GitHub Desktop.
Dockerで作るシンプルなRails開発環境
This file contains 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: '2' | |
services: | |
mysql: | |
image: mysql | |
volumes: | |
- ./data/mysql:/var/lib/mysql | |
ports: | |
- "3306:3306" | |
environment: | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
web: | |
build: . | |
command: bundle exec rails s -p 3000 -b '0.0.0.0' | |
volumes: | |
- .:/myapp | |
ports: | |
- "3000:3000" | |
depends_on: | |
- mysql |
This file contains 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.3.1 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
ADD Gemfile /myapp/Gemfile | |
ADD Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment