From 1561546c56965cf95a2b896c6f25cbab7902caa4 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Fri, 5 Sep 2014 13:55:36 -0600 Subject: [PATCH] Minor fixes to several readmes, and fixed ruby readme to be consistent with the other scripting languages. --- gcc/README-content.md | 2 +- gcc/README.md | 2 +- golang/README-content.md | 2 +- golang/README.md | 2 +- perl/README-content.md | 2 +- perl/README-short.txt | 2 +- perl/README.md | 2 +- ruby/README-content.md | 16 +++++++++++----- ruby/README.md | 16 +++++++++++----- 9 files changed, 29 insertions(+), 17 deletions(-) diff --git a/gcc/README-content.md b/gcc/README-content.md index 1c5f276c3..2bfe79e78 100644 --- a/gcc/README-content.md +++ b/gcc/README-content.md @@ -5,7 +5,7 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje # How to use this image -## Start a gcc instance running your app +## Start a gcc instance running your app. For this image, the most straight-forward use is to use a gcc container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. diff --git a/gcc/README.md b/gcc/README.md index 652c60076..d970998df 100644 --- a/gcc/README.md +++ b/gcc/README.md @@ -5,7 +5,7 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje # How to use this image -## Start a gcc instance running your app +## Start a gcc instance running your app. For this image, the most straight-forward use is to use a gcc container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. diff --git a/golang/README-content.md b/golang/README-content.md index 1f7d11e78..c0d3e8e0c 100644 --- a/golang/README-content.md +++ b/golang/README-content.md @@ -5,7 +5,7 @@ Go, also called golang, is a programming language initially developed at Google # How to use this image -## Start a go instance running in your app +## Start a go instance running in your app. For this image, the most straight-forward use is to use a golang container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. diff --git a/golang/README.md b/golang/README.md index e34af5434..3d0a29505 100644 --- a/golang/README.md +++ b/golang/README.md @@ -5,7 +5,7 @@ Go, also called golang, is a programming language initially developed at Google # How to use this image -## Start a go instance running in your app +## Start a go instance running in your app. For this image, the most straight-forward use is to use a golang container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. diff --git a/perl/README-content.md b/perl/README-content.md index 7df0aed48..9be2dd9ed 100644 --- a/perl/README-content.md +++ b/perl/README-content.md @@ -1,5 +1,5 @@ # What is Perl? -Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. +Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. The Perl languages borrow freatures from other programming languages including C, shell scripting (sh), AWK, and sed. > [wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) diff --git a/perl/README-short.txt b/perl/README-short.txt index 8b1378917..1fc5f2c12 100644 --- a/perl/README-short.txt +++ b/perl/README-short.txt @@ -1 +1 @@ - +Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. diff --git a/perl/README.md b/perl/README.md index e361312ad..6a4a146bf 100644 --- a/perl/README.md +++ b/perl/README.md @@ -1,5 +1,5 @@ # What is Perl? -Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. +Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. The Perl languages borrow freatures from other programming languages including C, shell scripting (sh), AWK, and sed. > [wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) diff --git a/ruby/README-content.md b/ruby/README-content.md index e43b402e2..a1eb4057f 100644 --- a/ruby/README-content.md +++ b/ruby/README-content.md @@ -7,7 +7,8 @@ According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, a # How to use this image -## 1. create a `Dockerfile` in your ruby app project +## Create a `Dockerfile` in your ruby app project + FROM ruby CMD ["./your-daemon-or-script.rb"] @@ -15,8 +16,13 @@ Put this file in the root of your app, next to the `Gemfile`. This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `ADD . /usr/src/app` and `RUN bundle install`. -## 2. build the ruby app image - docker build -t my-ruby-app . +Then build and run the ruby image. -## 3. start the ruby app container - docker run -it --name some-ruby-app my-ruby-app + docker build -t my-ruby-app . + docker run -it --name my-running-script my-ruby-app + +## Run a single ruby script + +For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a ruby script by using the ruby docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp ruby ruby your-daemon-or-script.rb diff --git a/ruby/README.md b/ruby/README.md index df5ae8b79..899c0add0 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -7,7 +7,8 @@ According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, a # How to use this image -## 1. create a `Dockerfile` in your ruby app project +## Create a `Dockerfile` in your ruby app project + FROM ruby CMD ["./your-daemon-or-script.rb"] @@ -15,11 +16,16 @@ Put this file in the root of your app, next to the `Gemfile`. This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `ADD . /usr/src/app` and `RUN bundle install`. -## 2. build the ruby app image - docker build -t my-ruby-app . +Then build and run the ruby image. -## 3. start the ruby app container - docker run -it --name some-ruby-app my-ruby-app + docker build -t my-ruby-app . + docker run -it --name my-running-script my-ruby-app + +## Run a single ruby script + +For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a ruby script by using the ruby docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp ruby ruby your-daemon-or-script.rb # Issues and Contributing