From 40e9038ef45f3c41e7fb92a202b59d5d157bdc83 Mon Sep 17 00:00:00 2001 From: Moghedrin Date: Wed, 3 Sep 2014 14:15:56 -0600 Subject: [PATCH] Added hylang, perl, and python docs --- hylang/README-content.md | 2 +- hylang/README.md | 2 +- perl/README-content.md | 23 +++++++++++++++++++++++ perl/README.md | 23 +++++++++++++++++++++++ python/README-content.md | 36 +++++++++++++++++++++++------------- python/README.md | 36 +++++++++++++++++++++++------------- 6 files changed, 94 insertions(+), 28 deletions(-) diff --git a/hylang/README-content.md b/hylang/README-content.md index 14a015a8e..985d0bd58 100644 --- a/hylang/README-content.md +++ b/hylang/README-content.md @@ -1,5 +1,5 @@ # What is hylang? -> [http://hy.readthedocs.org/en/latest/] +> [hy.readthedocs.org/en/latest/](http://hy.readthedocs.org/en/latest/) # How to use this image diff --git a/hylang/README.md b/hylang/README.md index a1cc5c3ef..87b017c9d 100644 --- a/hylang/README.md +++ b/hylang/README.md @@ -1,6 +1,6 @@ # What is hylang? -> [http://hy.readthedocs.org/en/latest/] +> [hy.readthedocs.org/en/latest/](http://hy.readthedocs.org/en/latest/) # How to use this image diff --git a/perl/README-content.md b/perl/README-content.md index 8b1378917..7df0aed48 100644 --- a/perl/README-content.md +++ b/perl/README-content.md @@ -1 +1,24 @@ +# What is Perl? +Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. +> [wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) + +# How to use this image + +## Create a `Dockerfile` in your perl app project. + + FROM perl + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "perl", "./your-daemon-or-script.pl" ] + +Then build and run the docker image. + + docker build -t my-perl-app + docker run -it --rm --name my-running-app my-perl-app + +## Run a single perl 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 perl script by using the perl docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp perl perl your-daemon-or-script.pl diff --git a/perl/README.md b/perl/README.md index 0cf5fd744..e361312ad 100644 --- a/perl/README.md +++ b/perl/README.md @@ -1,4 +1,27 @@ +# What is Perl? +Perl is a family of high-level, general-purpose, interpreted, dynamic programming language. +> [wikipedia.org/wiki/Perl](https://en.wikipedia.org/wiki/Perl) + +# How to use this image + +## Create a `Dockerfile` in your perl app project. + + FROM perl + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "perl", "./your-daemon-or-script.pl" ] + +Then build and run the docker image. + + docker build -t my-perl-app + docker run -it --rm --name my-running-app my-perl-app + +## Run a single perl 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 perl script by using the perl docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp perl perl your-daemon-or-script.pl # Issues and Contributing diff --git a/python/README-content.md b/python/README-content.md index dac9b9c93..7775fd0b4 100644 --- a/python/README-content.md +++ b/python/README-content.md @@ -5,21 +5,31 @@ Python is a widely used general-purpose, high-level programming language. Its de # How to use this image -## 1. create a `Dockerfile` in your python app project - FROM python:3 - ADD . /usr/src/app - WORKDIR /usr/src/app - CMD ["python3", "./your-daemon-or-script.py"] +## Create a `Dockerfile` in your python app project. -or (if you need caveman Python): + FROM python:3 + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "python", "./your-daemon-or-script.py" ] + +or (if you need to use Python 2): FROM python:2 - ADD . /usr/src/app - WORKDIR /usr/src/app - CMD ["python2", "./your-daemon-or-script.py"] + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "python", "./your-daemon-or-script.py" ] -## 2. build the python app image - docker build -t my-python-app . +Then build and run the docker image. -## 3. start the python app container - docker run -it --name some-python-app my-python-app + docker build -t my-python-app + docker run -it --rm --name my-running-app my-python-app + +## Run a single python 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 python script by using the python docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp python:3 python your-daemon-or-script.py + +or (again, if you need to use Python 2): + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp python:2 python your-daemon-or-script.py diff --git a/python/README.md b/python/README.md index c7a991cc6..fc8518f4b 100644 --- a/python/README.md +++ b/python/README.md @@ -5,24 +5,34 @@ Python is a widely used general-purpose, high-level programming language. Its de # How to use this image -## 1. create a `Dockerfile` in your python app project - FROM python:3 - ADD . /usr/src/app - WORKDIR /usr/src/app - CMD ["python3", "./your-daemon-or-script.py"] +## Create a `Dockerfile` in your python app project. -or (if you need caveman Python): + FROM python:3 + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "python", "./your-daemon-or-script.py" ] + +or (if you need to use Python 2): FROM python:2 - ADD . /usr/src/app - WORKDIR /usr/src/app - CMD ["python2", "./your-daemon-or-script.py"] + ADD . /usr/src/myapp + WORKDIR /usr/src/myapp + CMD [ "python", "./your-daemon-or-script.py" ] -## 2. build the python app image - docker build -t my-python-app . +Then build and run the docker image. -## 3. start the python app container - docker run -it --name some-python-app my-python-app + docker build -t my-python-app + docker run -it --rm --name my-running-app my-python-app + +## Run a single python 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 python script by using the python docker image directly. + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp python:3 python your-daemon-or-script.py + +or (again, if you need to use Python 2): + + docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp python:2 python your-daemon-or-script.py # Issues and Contributing