Ver código fonte

Added hylang, perl, and python docs

Moghedrin 11 anos atrás
pai
commit
40e9038ef4
6 arquivos alterados com 92 adições e 26 exclusões
  1. 1 1
      hylang/README-content.md
  2. 1 1
      hylang/README.md
  3. 23 0
      perl/README-content.md
  4. 23 0
      perl/README.md
  5. 22 12
      python/README-content.md
  6. 22 12
      python/README.md

+ 1 - 1
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

+ 1 - 1
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
 

+ 23 - 0
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

+ 23 - 0
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
 

+ 22 - 12
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
+## 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"]
+    ADD . /usr/src/myapp
+    WORKDIR /usr/src/myapp
+    CMD [ "python", "./your-daemon-or-script.py" ]
 
-or (if you need caveman Python):
+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" ]
+
+Then build and run the docker image.
+
+    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
 
-## 2. build the python app image
-    docker build -t my-python-app .
+or (again, if you need to use Python 2):
 
-## 3. start the python app container
-    docker run -it --name some-python-app my-python-app
+    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

+ 22 - 12
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
+## 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"]
+    ADD . /usr/src/myapp
+    WORKDIR /usr/src/myapp
+    CMD [ "python", "./your-daemon-or-script.py" ]
 
-or (if you need caveman Python):
+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" ]
+
+Then build and run the docker image.
+
+    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
 
-## 2. build the python app image
-    docker build -t my-python-app .
+or (again, if you need to use Python 2):
 
-## 3. start the python app container
-    docker run -it --name some-python-app my-python-app
+    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