소스 검색

Merge pull request #55 from infosiftr/ruby

Add example to generate Gemfile.lock for ruby bundler
Tianon Gravi 11 년 전
부모
커밋
64f7ce8f11
6개의 변경된 파일48개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      jruby/README.md
  2. 8 0
      jruby/content.md
  3. 8 0
      rails/README.md
  4. 8 0
      rails/content.md
  5. 8 0
      ruby/README.md
  6. 8 0
      ruby/content.md

+ 8 - 0
jruby/README.md

@@ -42,6 +42,14 @@ You can then build and run the Ruby image:
     docker build -t my-ruby-app .
     docker run -it --name my-running-script my-ruby-app
 
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app jruby:1.7.15 bundle install --system
+
 ## Run a single Ruby script
 
 For many simple, single file projects, you may find it inconvenient to write a

+ 8 - 0
jruby/content.md

@@ -36,6 +36,14 @@ You can then build and run the Ruby image:
     docker build -t my-ruby-app .
     docker run -it --name my-running-script my-ruby-app
 
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app jruby:1.7.15 bundle install --system
+
 ## Run a single Ruby script
 
 For many simple, single file projects, you may find it inconvenient to write a

+ 8 - 0
rails/README.md

@@ -41,6 +41,14 @@ need access outside the host, on port 8080:
 You can then go to `http://localhost:8080` or `http://host-ip:8080` in a
 browser.
 
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app ruby:2.1.2 bundle install --system
+
 # License
 
 View [license information](https://github.com/rails/rails#license)

+ 8 - 0
rails/content.md

@@ -35,3 +35,11 @@ need access outside the host, on port 8080:
 
 You can then go to `http://localhost:8080` or `http://host-ip:8080` in a
 browser.
+
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app ruby:2.1.2 bundle install --system

+ 8 - 0
ruby/README.md

@@ -37,6 +37,14 @@ You can then build and run the Ruby image:
     docker build -t my-ruby-app .
     docker run -it --name my-running-script my-ruby-app
 
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app ruby:2.1.2 bundle install --system
+
 ## Run a single Ruby script
 
 For many simple, single file projects, you may find it inconvenient to write a

+ 8 - 0
ruby/content.md

@@ -28,6 +28,14 @@ You can then build and run the Ruby image:
     docker build -t my-ruby-app .
     docker run -it --name my-running-script my-ruby-app
 
+### Generate a `Gemfile.lock`
+
+The `onbuid` tag expects a `Gemfile.lock` in your app directory. This `docker
+run` will help you generate one. Run it in the root of your app, next to the
+`Gemfile`:
+
+    docker run --rm -v "$(pwd)":/usr/src/app -w /usr/src/app ruby:2.1.2 bundle install --system
+
 ## Run a single Ruby script
 
 For many simple, single file projects, you may find it inconvenient to write a