Merge pull request #3 from infosiftr/naughty-moghedrin
PR for the stuff Moghedrin pushed directly to our fork's master
This commit is contained in:
commit
aa9b960d5c
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
|
||||||
If you have any questions about the image, please contact us %%MAILING_LIST%% through a [GitHub issue](https://github.com/docker-library/%%REPO%%/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
If you have any questions about the image, please contact us %%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
If you want to contribute new features or updates, we are always thrilled to receive pull requests, and do our best to process them as fast as possible.
|
If you want to contribute new features or updates, we are always thrilled to receive pull requests, and do our best to process them as fast as possible.
|
||||||
|
|
||||||
We recommend discussing your plans %%MAILING_LIST%% through a [GitHub issue](https://github.com/docker-library/%%REPO%%/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
We recommend discussing your plans %%MAILING_LIST%% through a [GitHub issue](%%REPO%%/issues) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||||
|
|
|
||||||
13
gen-docs.sh
13
gen-docs.sh
|
|
@ -10,6 +10,14 @@ fi
|
||||||
repos=( "${repos[@]%/}" )
|
repos=( "${repos[@]%/}" )
|
||||||
|
|
||||||
for repo in "${repos[@]}"; do
|
for repo in "${repos[@]}"; do
|
||||||
|
case "$repo" in
|
||||||
|
perl)
|
||||||
|
gitRepo="https://github.com/Perl/docker-perl"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
gitRepo="https://github.com/docker-library/$repo"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
if [ -e "$repo/README-content.md" ]; then
|
if [ -e "$repo/README-content.md" ]; then
|
||||||
mailingList="$(cat "$repo/mailing-list.md" 2>/dev/null | sed 's/[\/&]/\\&/g' || true)"
|
mailingList="$(cat "$repo/mailing-list.md" 2>/dev/null | sed 's/[\/&]/\\&/g' || true)"
|
||||||
if [ "$mailingList" ]; then
|
if [ "$mailingList" ]; then
|
||||||
|
|
@ -22,7 +30,10 @@ for repo in "${repos[@]}"; do
|
||||||
echo "cat $repo/README-content.md README-footer.md > $repo/README.md"
|
echo "cat $repo/README-content.md README-footer.md > $repo/README.md"
|
||||||
cat "$repo/README-content.md" "README-footer.md" > "$repo/README.md"
|
cat "$repo/README-content.md" "README-footer.md" > "$repo/README.md"
|
||||||
set -x
|
set -x
|
||||||
sed -ri 's/\s*%%MAILING_LIST%%\s*/'"$mailingList"'/g; s/%%REPO%%/'"$repo"'/g' "$repo/README.md"
|
sed -ri '
|
||||||
|
s/\s*%%MAILING_LIST%%\s*/'"$mailingList"'/g;
|
||||||
|
s!%%REPO%%!'"$gitRepo"'!g;
|
||||||
|
' "$repo/README.md"
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
echo "skipping $repo: repo/README-content.md"
|
echo "skipping $repo: repo/README-content.md"
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,21 @@ This will add your current directory as a volume to the container, set the worki
|
||||||
|
|
||||||
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3 make
|
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3 make
|
||||||
|
|
||||||
|
## Cross-compile your app inside the docker container.
|
||||||
|
|
||||||
|
If you need to compile your application for a platform other than `linux/amd64` (like `windows/386`, for example), the provided `cross` tags can be used to accomplish this with minimal friction:
|
||||||
|
|
||||||
|
docker run --rm -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp -e GOOS=windows -e GOARCH=386 golang:1.3-cross go build -v
|
||||||
|
|
||||||
|
Alternatively, build for multiple platforms at once:
|
||||||
|
|
||||||
|
docker run --rm -it -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp golang:1.3-cross bash
|
||||||
|
$ for GOOS in darwin linux; do
|
||||||
|
> for GOARCH in 386 amd64; do
|
||||||
|
> go build -v -o myapp-$GOOS-$GOARCH
|
||||||
|
> done
|
||||||
|
> done
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
|
|
||||||
|
|
@ -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/)
|
> [hy.readthedocs.org/en/latest/](http://hy.readthedocs.org/en/latest/)
|
||||||
|
|
||||||
# How to use this image
|
# 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
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,24 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed
|
||||||
|
|
||||||
# How to use this image
|
# 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
|
# User Feedback
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,4 @@ The image assumes that your application has a file named [`package.json`](https:
|
||||||
|
|
||||||
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a nodejs script by using the nodejs docker image directly.
|
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a nodejs script by using the nodejs docker image directly.
|
||||||
|
|
||||||
docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp node:0.10.31 node your-daemon-or-script.js
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp node:0.10.31 node your-daemon-or-script.js
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ The image assumes that your application has a file named [`package.json`](https:
|
||||||
|
|
||||||
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a nodejs script by using the nodejs docker image directly.
|
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a nodejs script by using the nodejs docker image directly.
|
||||||
|
|
||||||
docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp node:0.10.31 node your-daemon-or-script.js
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp node:0.10.31 node your-daemon-or-script.js
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,4 @@ Then build and run the docker image.
|
||||||
|
|
||||||
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.
|
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:5.20 perl your-daemon-or-script.pl
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp perl:5.20 perl your-daemon-or-script.pl
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Then build and run the docker image.
|
||||||
|
|
||||||
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.
|
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:5.20 perl your-daemon-or-script.pl
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp perl:5.20 perl your-daemon-or-script.pl
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Then run the commands to build and run the docker image.
|
||||||
|
|
||||||
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a php script by using the php docker image directly.
|
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a php script by using the php docker image directly.
|
||||||
|
|
||||||
docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp php:5.6-cli php your-script.php
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp php:5.6-cli php your-script.php
|
||||||
|
|
||||||
## With Apache
|
## With Apache
|
||||||
|
|
||||||
|
|
@ -45,4 +45,4 @@ Then run the commands to build and run the docker image.
|
||||||
|
|
||||||
If you don't want to include a `Dockerfile` in your project, then it is sufficient to do the following.
|
If you don't want to include a `Dockerfile` in your project, then it is sufficient to do the following.
|
||||||
|
|
||||||
docker run -it --rm --name my-apache-php-app -v $(pwd):/var/www/html php:5.6-apache
|
docker run -it --rm --name my-apache-php-app -v "$(pwd)":/var/www/html php:5.6-apache
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Then run the commands to build and run the docker image.
|
||||||
|
|
||||||
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a php script by using the php docker image directly.
|
For many single file projects, it may not be convenient to write a `Dockerfile` for your project. In such cases, you can run a php script by using the php docker image directly.
|
||||||
|
|
||||||
docker run -it --rm --name my-running-script -v $(pwd):/usr/src/myapp -w /usr/src/myapp php:5.6-cli php your-script.php
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp php:5.6-cli php your-script.php
|
||||||
|
|
||||||
## With Apache
|
## With Apache
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ Then run the commands to build and run the docker image.
|
||||||
|
|
||||||
If you don't want to include a `Dockerfile` in your project, then it is sufficient to do the following.
|
If you don't want to include a `Dockerfile` in your project, then it is sufficient to do the following.
|
||||||
|
|
||||||
docker run -it --rm --name my-apache-php-app -v $(pwd):/var/www/html php:5.6-apache
|
docker run -it --rm --name my-apache-php-app -v "$(pwd)":/var/www/html php:5.6-apache
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ Then build and run the docker image.
|
||||||
|
|
||||||
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.
|
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
|
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):
|
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
|
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
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ Then build and run the docker image.
|
||||||
|
|
||||||
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.
|
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
|
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):
|
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
|
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
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,4 @@ Then build and run the ruby image.
|
||||||
|
|
||||||
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.
|
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:2.1.2 ruby your-daemon-or-script.rb
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ruby:2.1.2 ruby your-daemon-or-script.rb
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Then build and run the ruby image.
|
||||||
|
|
||||||
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.
|
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:2.1.2 ruby your-daemon-or-script.rb
|
docker run -it --rm --name my-running-script -v "$(pwd)":/usr/src/myapp -w /usr/src/myapp ruby:2.1.2 ruby your-daemon-or-script.rb
|
||||||
|
|
||||||
# User Feedback
|
# User Feedback
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue