diff --git a/gcc/README-content.md b/gcc/README-content.md index c953b7a55..a1b0c139a 100644 --- a/gcc/README-content.md +++ b/gcc/README-content.md @@ -10,7 +10,7 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje For this image, the most straight-forward use is to use a gcc container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. FROM gcc:4.9 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN gcc -o myapp main.c CMD ["./myapp"] diff --git a/gcc/README.md b/gcc/README.md index 6baf6abbf..6a54f57ac 100644 --- a/gcc/README.md +++ b/gcc/README.md @@ -10,7 +10,7 @@ The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Proje For this image, the most straight-forward use is to use a gcc container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. FROM gcc:4.9 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN gcc -o myapp main.c CMD ["./myapp"] diff --git a/hylang/README-content.md b/hylang/README-content.md index edfdb01e2..3e762b22d 100644 --- a/hylang/README-content.md +++ b/hylang/README-content.md @@ -9,7 +9,7 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed ## Create a `Dockerfile` in your hylang project. FROM hylang:0.10.0 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "hy", "./your-daemon-or-script.hy" ] diff --git a/hylang/README.md b/hylang/README.md index 18a5d1677..b3dd677d8 100644 --- a/hylang/README.md +++ b/hylang/README.md @@ -9,7 +9,7 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed ## Create a `Dockerfile` in your hylang project. FROM hylang:0.10.0 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "hy", "./your-daemon-or-script.hy" ] diff --git a/java/README-content.md b/java/README-content.md index 2ea9b4e85..b2571dced 100644 --- a/java/README-content.md +++ b/java/README-content.md @@ -13,7 +13,7 @@ Java is a registered trademark of Oracle and/or its affiliates. For this image, the most straight-forward use is to use a java container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. FROM java:7 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN javac Main.java CMD ["java", "Main"] diff --git a/java/README.md b/java/README.md index 984683f28..5de17d87b 100644 --- a/java/README.md +++ b/java/README.md @@ -13,7 +13,7 @@ Java is a registered trademark of Oracle and/or its affiliates. For this image, the most straight-forward use is to use a java container as both the build environment as well as the runtime environment. In your Dockerfile, you can do something along the lines of the following will compile and run your project. FROM java:7 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp RUN javac Main.java CMD ["java", "Main"] diff --git a/nginx/README-content.md b/nginx/README-content.md index edeacf4c5..e249c10ce 100644 --- a/nginx/README-content.md +++ b/nginx/README-content.md @@ -13,7 +13,7 @@ Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, H Alternatively, a simple `Dockerfile` can be used to generate a new image that includes the necessary content (which is a much cleaner solution than the bind mount above): FROM nginx - ADD static-html-directory /usr/local/nginx/html + COPY static-html-directory /usr/local/nginx/html Place this file in the same directory as your directory of content ("static-html-directory"), run `docker build -t some-content-nginx .`, then start your container: @@ -40,7 +40,7 @@ If you wish to adapt the default configuration, use something like the following As above, this can also be accomplished more cleanly using a simple `Dockerfile`: FROM nginx - ADD nginx.conf /etc/nginx.conf + COPY nginx.conf /etc/nginx.conf Then, build with `docker build -t some-custom-nginx .` and run: diff --git a/nginx/README.md b/nginx/README.md index 70742fcfb..e5d674875 100644 --- a/nginx/README.md +++ b/nginx/README.md @@ -13,7 +13,7 @@ Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, H Alternatively, a simple `Dockerfile` can be used to generate a new image that includes the necessary content (which is a much cleaner solution than the bind mount above): FROM nginx - ADD static-html-directory /usr/local/nginx/html + COPY static-html-directory /usr/local/nginx/html Place this file in the same directory as your directory of content ("static-html-directory"), run `docker build -t some-content-nginx .`, then start your container: @@ -40,7 +40,7 @@ If you wish to adapt the default configuration, use something like the following As above, this can also be accomplished more cleanly using a simple `Dockerfile`: FROM nginx - ADD nginx.conf /etc/nginx.conf + COPY nginx.conf /etc/nginx.conf Then, build with `docker build -t some-custom-nginx .` and run: diff --git a/perl/README-content.md b/perl/README-content.md index fb54d8d9f..de0b8ed09 100644 --- a/perl/README-content.md +++ b/perl/README-content.md @@ -8,7 +8,7 @@ Perl is a family of high-level, general-purpose, interpreted, dynamic programmin ## Create a `Dockerfile` in your perl app project. FROM perl:5.20 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "perl", "./your-daemon-or-script.pl" ] diff --git a/perl/README.md b/perl/README.md index 3359140d4..a2cc6e762 100644 --- a/perl/README.md +++ b/perl/README.md @@ -8,7 +8,7 @@ Perl is a family of high-level, general-purpose, interpreted, dynamic programmin ## Create a `Dockerfile` in your perl app project. FROM perl:5.20 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "perl", "./your-daemon-or-script.pl" ] diff --git a/php/README-content.md b/php/README-content.md index 3b991fe10..33ecf95ef 100644 --- a/php/README-content.md +++ b/php/README-content.md @@ -12,7 +12,7 @@ In the case that you have a PHP project run through the command line interface, ### Create a `Dockerfile` in your php project. FROM php:5.6-cli - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "php", "./your-script.php" ] @@ -34,7 +34,7 @@ In the more common case, you will probably want to run PHP in conjunction with A ### Create a `Dockerfile` in your php project. FROM php:5.6-apache - ADD . /var/www/html + COPY . /var/www/html Then run the commands to build and run the docker image. diff --git a/php/README.md b/php/README.md index 48ac930a2..6ea1400b3 100644 --- a/php/README.md +++ b/php/README.md @@ -12,7 +12,7 @@ In the case that you have a PHP project run through the command line interface, ### Create a `Dockerfile` in your php project. FROM php:5.6-cli - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "php", "./your-script.php" ] @@ -34,7 +34,7 @@ In the more common case, you will probably want to run PHP in conjunction with A ### Create a `Dockerfile` in your php project. FROM php:5.6-apache - ADD . /var/www/html + COPY . /var/www/html Then run the commands to build and run the docker image. diff --git a/python/README-content.md b/python/README-content.md index fed04dc22..f46a340da 100644 --- a/python/README-content.md +++ b/python/README-content.md @@ -8,14 +8,14 @@ Python is a widely used general-purpose, high-level programming language. Its de ## Create a `Dockerfile` in your python app project. FROM python:3 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "python", "./your-daemon-or-script.py" ] or (if you need to use Python 2): FROM python:2 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "python", "./your-daemon-or-script.py" ] diff --git a/python/README.md b/python/README.md index 94b87d54e..2e7ceafc6 100644 --- a/python/README.md +++ b/python/README.md @@ -8,14 +8,14 @@ Python is a widely used general-purpose, high-level programming language. Its de ## Create a `Dockerfile` in your python app project. FROM python:3 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "python", "./your-daemon-or-script.py" ] or (if you need to use Python 2): FROM python:2 - ADD . /usr/src/myapp + COPY . /usr/src/myapp WORKDIR /usr/src/myapp CMD [ "python", "./your-daemon-or-script.py" ] diff --git a/rails/README-content.md b/rails/README-content.md index e0bd7fd0d..1e24ea94a 100644 --- a/rails/README-content.md +++ b/rails/README-content.md @@ -11,7 +11,7 @@ Ruby on Rails, often simply referred to as Rails, is an open source web applicat Put this file in the root of your app, next to the `Gemfile`. -This image includes multiple `ONBUILD` triggers so that should be all that you need for most applications. The build will `ADD . /usr/src/app`, `RUN bundle install`, `EXPOSE 3000`, and set the default command to `rails server`. +This image includes multiple `ONBUILD` triggers so that should be all that you need for most applications. The build will `COPY . /usr/src/app`, `RUN bundle install`, `EXPOSE 3000`, and set the default command to `rails server`. Then build and run the docker image. diff --git a/rails/README.md b/rails/README.md index 2d33b68fa..60b93338a 100644 --- a/rails/README.md +++ b/rails/README.md @@ -11,7 +11,7 @@ Ruby on Rails, often simply referred to as Rails, is an open source web applicat Put this file in the root of your app, next to the `Gemfile`. -This image includes multiple `ONBUILD` triggers so that should be all that you need for most applications. The build will `ADD . /usr/src/app`, `RUN bundle install`, `EXPOSE 3000`, and set the default command to `rails server`. +This image includes multiple `ONBUILD` triggers so that should be all that you need for most applications. The build will `COPY . /usr/src/app`, `RUN bundle install`, `EXPOSE 3000`, and set the default command to `rails server`. Then build and run the docker image. diff --git a/ruby/README-content.md b/ruby/README-content.md index ef5d1d0ed..78dd869ae 100644 --- a/ruby/README-content.md +++ b/ruby/README-content.md @@ -14,7 +14,7 @@ According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, a Put this file in the root of your app, next to the `Gemfile`. -This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `ADD . /usr/src/app` and `RUN bundle install`. +This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `COPY . /usr/src/app` and `RUN bundle install`. Then build and run the ruby image. diff --git a/ruby/README.md b/ruby/README.md index 79a220a0a..75cd6b8c1 100644 --- a/ruby/README.md +++ b/ruby/README.md @@ -14,7 +14,7 @@ According to its authors, Ruby was influenced by Perl, Smalltalk, Eiffel, Ada, a Put this file in the root of your app, next to the `Gemfile`. -This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `ADD . /usr/src/app` and `RUN bundle install`. +This image includes multiple `ONBUILD` triggers so that should be all that you need to bootstrap most applications. The build will `COPY . /usr/src/app` and `RUN bundle install`. Then build and run the ruby image.