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 718f76984..e293c0331 100644 --- a/hylang/README-content.md +++ b/hylang/README-content.md @@ -22,4 +22,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 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 + 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 f1125e025..36080bfe2 100644 --- a/hylang/README.md +++ b/hylang/README.md @@ -22,7 +22,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 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 + 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 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..3cd524e51 100644 --- a/perl/README.md +++ b/perl/README.md @@ -21,16 +21,16 @@ 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 ## Issues -If you have any questions about the image, please contact us through a [GitHub issue](https://github.com/Perl/docker-perl/issues) or in the IRC channel `#docker-library` on [Freenode](https://freenode.net). +If you have any questions about the image, please contact us through a [GitHub issue](https://github.com/Perl/perl/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 through a [GitHub issue](https://github.com/Perl/docker-perl/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 through a [GitHub issue](https://github.com/Perl/perl/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/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