Преглед изворни кода

Quoted all instances of pwd and generated docs

Moghedrin пре 11 година
родитељ
комит
95fea3694b

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

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

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

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

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

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

+ 3 - 3
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.

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

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

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

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

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

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