Run s/ADD/COPY/g as appropriate

This commit is contained in:
Tianon Gravi 2014-09-09 10:55:38 -06:00
parent bc66d39567
commit 1a4cb7bf1b
18 changed files with 24 additions and 24 deletions

View File

@ -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. 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 FROM gcc:4.9
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
RUN gcc -o myapp main.c RUN gcc -o myapp main.c
CMD ["./myapp"] CMD ["./myapp"]

View File

@ -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. 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 FROM gcc:4.9
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
RUN gcc -o myapp main.c RUN gcc -o myapp main.c
CMD ["./myapp"] CMD ["./myapp"]

View File

@ -9,7 +9,7 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed
## Create a `Dockerfile` in your hylang project. ## Create a `Dockerfile` in your hylang project.
FROM hylang:0.10.0 FROM hylang:0.10.0
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "hy", "./your-daemon-or-script.hy" ] CMD [ "hy", "./your-daemon-or-script.hy" ]

View File

@ -9,7 +9,7 @@ Hy (alternately, Hylang) is a dialect of the Lisp programming language designed
## Create a `Dockerfile` in your hylang project. ## Create a `Dockerfile` in your hylang project.
FROM hylang:0.10.0 FROM hylang:0.10.0
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "hy", "./your-daemon-or-script.hy" ] CMD [ "hy", "./your-daemon-or-script.hy" ]

View File

@ -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. 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 FROM java:7
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
RUN javac Main.java RUN javac Main.java
CMD ["java", "Main"] CMD ["java", "Main"]

View File

@ -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. 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 FROM java:7
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
RUN javac Main.java RUN javac Main.java
CMD ["java", "Main"] CMD ["java", "Main"]

View File

@ -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): 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 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: 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`: As above, this can also be accomplished more cleanly using a simple `Dockerfile`:
FROM nginx 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: Then, build with `docker build -t some-custom-nginx .` and run:

View File

@ -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): 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 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: 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`: As above, this can also be accomplished more cleanly using a simple `Dockerfile`:
FROM nginx 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: Then, build with `docker build -t some-custom-nginx .` and run:

View File

@ -8,7 +8,7 @@ Perl is a family of high-level, general-purpose, interpreted, dynamic programmin
## Create a `Dockerfile` in your perl app project. ## Create a `Dockerfile` in your perl app project.
FROM perl:5.20 FROM perl:5.20
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "perl", "./your-daemon-or-script.pl" ] CMD [ "perl", "./your-daemon-or-script.pl" ]

View File

@ -8,7 +8,7 @@ Perl is a family of high-level, general-purpose, interpreted, dynamic programmin
## Create a `Dockerfile` in your perl app project. ## Create a `Dockerfile` in your perl app project.
FROM perl:5.20 FROM perl:5.20
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "perl", "./your-daemon-or-script.pl" ] CMD [ "perl", "./your-daemon-or-script.pl" ]

View File

@ -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. ### Create a `Dockerfile` in your php project.
FROM php:5.6-cli FROM php:5.6-cli
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ] 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. ### Create a `Dockerfile` in your php project.
FROM php:5.6-apache FROM php:5.6-apache
ADD . /var/www/html COPY . /var/www/html
Then run the commands to build and run the docker image. Then run the commands to build and run the docker image.

View File

@ -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. ### Create a `Dockerfile` in your php project.
FROM php:5.6-cli FROM php:5.6-cli
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "php", "./your-script.php" ] 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. ### Create a `Dockerfile` in your php project.
FROM php:5.6-apache FROM php:5.6-apache
ADD . /var/www/html COPY . /var/www/html
Then run the commands to build and run the docker image. Then run the commands to build and run the docker image.

View File

@ -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. ## Create a `Dockerfile` in your python app project.
FROM python:3 FROM python:3
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "python", "./your-daemon-or-script.py" ] CMD [ "python", "./your-daemon-or-script.py" ]
or (if you need to use Python 2): or (if you need to use Python 2):
FROM python:2 FROM python:2
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "python", "./your-daemon-or-script.py" ] CMD [ "python", "./your-daemon-or-script.py" ]

View File

@ -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. ## Create a `Dockerfile` in your python app project.
FROM python:3 FROM python:3
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "python", "./your-daemon-or-script.py" ] CMD [ "python", "./your-daemon-or-script.py" ]
or (if you need to use Python 2): or (if you need to use Python 2):
FROM python:2 FROM python:2
ADD . /usr/src/myapp COPY . /usr/src/myapp
WORKDIR /usr/src/myapp WORKDIR /usr/src/myapp
CMD [ "python", "./your-daemon-or-script.py" ] CMD [ "python", "./your-daemon-or-script.py" ]

View File

@ -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`. 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. Then build and run the docker image.

View File

@ -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`. 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. Then build and run the docker image.

View File

@ -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`. 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. Then build and run the ruby image.

View File

@ -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`. 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. Then build and run the ruby image.