diff --git a/README-footer.md b/README-footer.md index 8137e72b2..3aa10d7ba 100644 --- a/README-footer.md +++ b/README-footer.md @@ -3,10 +3,10 @@ ## 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 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. diff --git a/gen-docs.sh b/gen-docs.sh index 5b31c3657..a0160dc4b 100755 --- a/gen-docs.sh +++ b/gen-docs.sh @@ -10,6 +10,14 @@ fi repos=( "${repos[@]%/}" ) 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 mailingList="$(cat "$repo/mailing-list.md" 2>/dev/null | sed 's/[\/&]/\\&/g' || true)" if [ "$mailingList" ]; then @@ -22,7 +30,10 @@ for repo in "${repos[@]}"; do echo "cat $repo/README-content.md README-footer.md > $repo/README.md" cat "$repo/README-content.md" "README-footer.md" > "$repo/README.md" 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 echo "skipping $repo: repo/README-content.md" diff --git a/golang/README.md b/golang/README.md index 89e456604..2a0f728b4 100644 --- a/golang/README.md +++ b/golang/README.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 +## 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 ## Issues diff --git a/hylang/README-content.md b/hylang/README-content.md index dec092771..e293c0331 100644 --- a/hylang/README-content.md +++ b/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 diff --git a/hylang/README.md b/hylang/README.md index 9078606e7..36080bfe2 100644 --- a/hylang/README.md +++ b/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 diff --git a/node/README-content.md b/node/README-content.md index 2861ffecc..4101b885e 100644 --- a/node/README-content.md +++ b/node/README-content.md @@ -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. - 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 diff --git a/node/README.md b/node/README.md index 7f0ec5db0..857ffc656 100644 --- a/node/README.md +++ b/node/README.md @@ -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. - 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 diff --git a/perl/README-content.md b/perl/README-content.md index 9ae6a0248..fb54d8d9f 100644 --- a/perl/README-content.md +++ b/perl/README-content.md @@ -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. - 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 diff --git a/perl/README.md b/perl/README.md index e66ada152..3359140d4 100644 --- a/perl/README.md +++ b/perl/README.md @@ -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. - 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 diff --git a/php/README-content.md b/php/README-content.md index 60b7b19c0..3b991fe10 100644 --- a/php/README-content.md +++ b/php/README-content.md @@ -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. - 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 @@ -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. - 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 diff --git a/php/README.md b/php/README.md index ca4779eae..48ac930a2 100644 --- a/php/README.md +++ b/php/README.md @@ -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. - 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 @@ -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. - 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 diff --git a/python/README-content.md b/python/README-content.md index 7775fd0b4..fed04dc22 100644 --- a/python/README-content.md +++ b/python/README-content.md @@ -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. - 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): - 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 diff --git a/python/README.md b/python/README.md index db5054a0b..94b87d54e 100644 --- a/python/README.md +++ b/python/README.md @@ -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. - 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): - 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 diff --git a/ruby/README-content.md b/ruby/README-content.md index 3a9e9d3b9..ef5d1d0ed 100644 --- a/ruby/README-content.md +++ b/ruby/README-content.md @@ -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. - 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 diff --git a/ruby/README.md b/ruby/README.md index 5afb0cec2..79a220a0a 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -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. - 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