Просмотр исходного кода

Finished documentation for Hylang

Moghedrin 11 лет назад
Родитель
Сommit
4e6b311537
2 измененных файлов с 36 добавлено и 0 удалено
  1. 18 0
      hylang/README-content.md
  2. 18 0
      hylang/README.md

+ 18 - 0
hylang/README-content.md

@@ -5,3 +5,21 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed
 > [hy.readthedocs.org/en/latest/](http://hy.readthedocs.org/en/latest/)
 
 # How to use this image
+
+## Create a `Dockerfile` in your hylang project.
+
+    FROM hylang:0.10.0
+    ADD . /usr/src/myapp
+    WORKDIR /usr/src/myapp
+    CMD [ "hy", "./your-daemon-or-script.hy" ]
+
+Then build and run the docker image.
+
+    docker build -t my-hylang-app
+    docker run -it --rm --name my-running-app my-hylang-app
+
+## Run a single hylang 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 hylang script by using the hylang docker image directly.
+
+    docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp hylang:0.10.0 hy your-daemon-or-script.py

+ 18 - 0
hylang/README.md

@@ -6,6 +6,24 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed
 
 # How to use this image
 
+## Create a `Dockerfile` in your hylang project.
+
+    FROM hylang:0.10.0
+    ADD . /usr/src/myapp
+    WORKDIR /usr/src/myapp
+    CMD [ "hy", "./your-daemon-or-script.hy" ]
+
+Then build and run the docker image.
+
+    docker build -t my-hylang-app
+    docker run -it --rm --name my-running-app my-hylang-app
+
+## Run a single hylang 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 hylang script by using the hylang docker image directly.
+
+    docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp hylang:0.10.0 hy your-daemon-or-script.py
+
 # User Feedback
 
 ## Issues