Skip to content

Commit

Permalink
Merge pull request docker#294 from ManoMarks/master
Browse files Browse the repository at this point in the history
First push to convert all Docker Hub references to Docker Cloud Store
  • Loading branch information
spara committed Jun 12, 2017
2 parents 80194c6 + 4631a05 commit f0e9964
Show file tree
Hide file tree
Showing 44 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion 12factor/09_disposability.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Our application exposes HTTP endPoints that are easy and quick to handle. If we

Kafka stores indexes of events processed by each worker. When a worker is restared, it can provide an index indicating at which point in time it needs to restart the event handling. Doing so no events are lost.

[Docker Hub](https://hub.docker.com) offers several image of Kafka ([Spotify](https://hub.docker.com/r/spotify/kafka/), [Wurstmeister](https://hub.docker.com/r/wurstmeister/kafka/), ...) that can easily be integrated in the docker-compose file of the application.
[Docker Store](https://store.docker.com) offers several image of Kafka ([Spotify](https://store.docker.com/community/images/spotify/kafka), [Wurstmeister](https://store.docker.com/community/images/wurstmeister/kafka), ...) that can easily be integrated in the docker-compose file of the application.

Below is an example of how Kafka (and zookeeper) could be added to our docker-compose file. Of course, this means the application has been slightly changed to be able to write and read to/from Kafka.

Expand Down
2 changes: 1 addition & 1 deletion 12factor/10_dev_prod_parity.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The different environments must be as close as possible.

Docker is very good at reducing the gap as the same services can be deployed on the developer machine as they could on any Docker Hosts.

A lot of external services are available on the Docker Hub and can be used in an existing application. Using those components enables a developer to use Postgres in development instead of SQLite or other lighter alternative. This reduces the risk of small differences that could show up later, when the app is on production.
A lot of external services are available on the Docker Store and can be used in an existing application. Using those components enables a developer to use Postgres in development instead of SQLite or other lighter alternative. This reduces the risk of small differences that could show up later, when the app is on production.

This factor shows an orientation toward continuous deployment, where development can go from dev to production in a very short timeframe, thus avoiding the big bang effect at each release.

Expand Down
4 changes: 2 additions & 2 deletions beginner/chapters/alpine.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ drwxr-xr-x 5 root root 4096 Mar 2 16:20 lib
```
What happened? Behind the scenes, a lot of stuff happened. When you call `run`,
1. The Docker client contacts the Docker daemon
2. The Docker daemon dowloads the image (alpine in this case) from Docker Hub
2. The Docker daemon dowloads the image (alpine in this case) from Docker Store
3. The Docker daemon creates the container and then runs a command in that container.
4. The Docker daemon streams the output of the command to the Docker client

Expand Down Expand Up @@ -93,7 +93,7 @@ In the last section, you saw a lot of Docker-specific jargon which might be conf
- *Containers* - Running instances of Docker images — containers run the actual applications. A container includes an application and all of its dependencies. It shares the kernel with other containers, and runs as an isolated process in user space on the host OS. You created a container using `docker run` which you did using the alpine image that you downloaded. A list of running containers can be seen using the `docker ps` command.
- *Docker daemon* - The background service running on the host that manages building, running and distributing Docker containers.
- *Docker client* - The command line tool that allows the user to interact with the Docker daemon.
- *Docker Hub* - A [registry](https://hub.docker.com/explore/) of Docker images. You can think of the registry as a directory of all available Docker images. You'll be using this later in this tutorial.
- *Docker Store* - A [registry](https://store.docker.com/) of Docker images, where you can find trusted and enterprise ready containers, plugins, and Docker editions. You'll be using this later in this tutorial.

## Next Steps
For the next step in the tutorial, head over to [2.0 Webapps with Docker](./webapps.md)
2 changes: 1 addition & 1 deletion beginner/chapters/setup.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Setup

### Prerequisites
There are no specific skills needed for this tutorial beyond a basic comfort with the command line and using a text editor. Prior experience in developing web applications will be helpful but is not required. As you proceed further along the tutorial, we'll make use of [Docker Hub](https://hub.docker.com/).
There are no specific skills needed for this tutorial beyond a basic comfort with the command line and using a text editor. Prior experience in developing web applications will be helpful but is not required. As you proceed further along the tutorial, we'll make use of [Docker Cloud](https://cloud.docker.com/).

### Setting up your computer
Getting all the tooling setup on your computer can be a daunting task, but getting Docker up and running on your favorite OS has become very easy.
Expand Down
4 changes: 2 additions & 2 deletions beginner/chapters/votingapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cd example-voting-app
```

### 3.1 Deploying the app
For this first stage, we will use existing images that are in Docker Hub.
For this first stage, we will use existing images that are in Docker Store.

This app relies on [Docker Swarm mode](https://docs.docker.com/engine/swarm/). Swarm mode is the cluster management and orchestration features embedded in the Docker engine. You can easily deploy to a swarm using a file that declares your desired state for the app. Swarm allows you to run your containers on more than one machine. In this tutorial, you can run on just one machine, or you can use something like [Docker for AWS](https://beta.docker.com/) or [Docker for Azure](https://beta.docker.com/) to quickly create a multiple node machine. Alternately, you can use Docker Machine to create a number of local nodes on your development machine. See [the Swarm Mode lab](../../swarm-mode/beginner-tutorial/README.md#creating-the-nodes-and-swarm) for more information.

Expand Down Expand Up @@ -260,4 +260,4 @@ docker stack rm vote
```

### 3.3 Next steps
Now that you've built some images and pushed them to docker hub, and learned the basics of Swarm mode, you can explore more of Docker by checking out [the documentation](https://docs.docker.com). And if you need any help, check out the [Docker Forums](forums.docker.com) or [StackOverflow](https://stackoverflow.com/tags/docker/).
Now that you've built some images and pushed them to Docker Cloud, and learned the basics of Swarm mode, you can explore more of Docker by checking out [the documentation](https://docs.docker.com). And if you need any help, check out the [Docker Forums](forums.docker.com) or [StackOverflow](https://stackoverflow.com/tags/docker/).
22 changes: 11 additions & 11 deletions beginner/chapters/webapps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Great! So you have now looked at `docker run`, played with a Docker container an
### 2.1 Run a static website in a container
>**Note:** Code for this section is in this repo in the [static-site directory](https://github.com/docker/labs/tree/master/beginner/static-site).
Let's start by taking baby-steps. First, we'll use Docker to run a static website in a container. The website is based on an existing image. We'll pull a Docker image from Docker Hub, run the container, and see how easy it is to set up a web server.
Let's start by taking baby-steps. First, we'll use Docker to run a static website in a container. The website is based on an existing image. We'll pull a Docker image from Docker Store, run the container, and see how easy it is to set up a web server.

The image that you are going to use is a single-page website that was already created for this demo and is available on the Docker Hub as [`dockersamples/static-site`](https://hub.docker.com/r/dockersamples/static-site/). You can download and run the image directly in one go using `docker run` as follows.
The image that you are going to use is a single-page website that was already created for this demo and is available on the Docker Store as [`dockersamples/static-site`](https://store.docker.com/community/images/dockersamples/static-site). You can download and run the image directly in one go using `docker run` as follows.

```
$ docker run -d dockersamples/static-site
Expand Down Expand Up @@ -107,7 +107,7 @@ CONTAINER ID IMAGE COMMAND CREATED

### 2.2 Docker Images

In this section, let's dive deeper into what Docker images are. You will build your own image, use that image to run an application locally, and finally, push some of your own images to Docker Hub.
In this section, let's dive deeper into what Docker images are. You will build your own image, use that image to run an application locally, and finally, push some of your own images to Docker Cloud.

Docker images are the basis of containers. In the previous example, you **pulled** the *dockersamples/static-site* image from the registry and asked the Docker client to run a container **based** on that image. To see the list of images that are available locally on your system, run the `docker images` command.

Expand Down Expand Up @@ -144,7 +144,7 @@ So for example, the `docker pull` command given below will pull an image named `
$ docker pull ubuntu
```

To get a new Docker image you can either get it from a registry (such as the Docker Hub) or create your own. There are hundreds of thousands of images available on [Docker hub](https://hub.docker.com). You can also search for images directly from the command line using `docker search`.
To get a new Docker image you can either get it from a registry (such as the Docker Store) or create your own. There are hundreds of thousands of images available on [Docker Store](https://store.docker.com). You can also search for images directly from the command line using `docker search`.

An important distinction with regard to images is between _base images_ and _child images_.

Expand All @@ -156,7 +156,7 @@ Another key concept is the idea of _official images_ and _user images_. (Both of

- **Official images** are Docker sanctioned images. Docker, Inc. sponsors a dedicated team that is responsible for reviewing and publishing all Official Repositories content. This team works in collaboration with upstream software maintainers, security experts, and the broader Docker community. These are not prefixed by an organization or user name. In the list of images above, the `python`, `node`, `alpine` and `nginx` images are official (base) images. To find out more about them, check out the [Official Images Documentation](https://docs.docker.com/docker-hub/official_repos/).

- **User images** are images created and shared by users like you. They build on base images and add additional functionality. Typically these are formatted as `user/image-name`. The `user` value in the image name is your Docker Hub user or organization name.
- **User images** are images created and shared by users like you. They build on base images and add additional functionality. Typically these are formatted as `user/image-name`. The `user` value in the image name is your Docker Store user or organization name.

### 2.3 Create your first image
>**Note:** The code for this section is in this repository in the [flask-app](https://github.com/docker/labs/tree/master/beginner/flask-app) directory.
Expand Down Expand Up @@ -258,7 +258,7 @@ Create a directory called `templates` and create an **index.html** file in that
</html>
```
### 2.3.2 Write a Dockerfile
We want to create a Docker image with this web app. As mentioned above, all user images are based on a _base image_. Since our application is written in Python, we will build our own Python image based on [Alpine](https://hub.docker.com/_/alpine/). We'll do that using a **Dockerfile**.
We want to create a Docker image with this web app. As mentioned above, all user images are based on a _base image_. Since our application is written in Python, we will build our own Python image based on [Alpine](https://store.docker.com/images/alpine. We'll do that using a **Dockerfile**.

A [Dockerfile](https://docs.docker.com/engine/reference/builder/) is a text file that contains a list of commands that the Docker daemon calls while creating an image. The Dockerfile contains all the information that Docker needs to know to run the app &#8212; a base Docker image to run from, location of your project code, any dependencies it has, and what commands to run at start-up. It is a simple way to automate the image creation process. The best part is that the [commands](https://docs.docker.com/engine/reference/builder/) you write in a Dockerfile are *almost* identical to their equivalent Linux commands. This means you don't really have to learn new syntax to create your own Dockerfiles.

Expand Down Expand Up @@ -335,7 +335,7 @@ A [Dockerfile](https://docs.docker.com/engine/reference/builder/) is a text file

Now that you have your `Dockerfile`, you can build your image. The `docker build` command does the heavy-lifting of creating a docker image from a `Dockerfile`.

When you run the `docker build` command given below, make sure to replace `<YOUR_USERNAME>` with your username. This username should be the same one you created when registering on [Docker hub](https://hub.docker.com). If you haven't done that yet, please go ahead and create an account.
When you run the `docker build` command given below, make sure to replace `<YOUR_USERNAME>` with your username. This username should be the same one you created when registering on [Docker Cloud](https://cloud.docker.com). If you haven't done that yet, please go ahead and create an account.

The `docker build` command is quite simple - it takes an optional tag name with the `-t` flag, and the location of the directory containing the `Dockerfile` - the `.` indicates the current directory:

Expand Down Expand Up @@ -422,9 +422,9 @@ Head over to `http://localhost:8888` and your app should be live. **Note** If yo
Hit the Refresh button in the web browser to see a few more cat images.

### 2.3.4 Push your image
Now that you've created and tested your image, you can push it to [Docker Hub](https://hub.docker.com).
Now that you've created and tested your image, you can push it to [Docker Cloud](https://cloud.docker.com).

First you have to login to your Docker hub account, to do that:
First you have to login to your Docker Cloud account, to do that:

```
docker login
Expand Down Expand Up @@ -456,7 +456,7 @@ $ docker rm -f myfirstapp

Here's a quick summary of the few basic commands we used in our Dockerfile.

* `FROM` starts the Dockerfile. It is a requirement that the Dockerfile must start with the `FROM` command. Images are created in layers, which means you can use another image as the base image for your own. The `FROM` command defines your base layer. As arguments, it takes the name of the image. Optionally, you can add the Docker Hub username of the maintainer and image version, in the format `username/imagename:version`.
* `FROM` starts the Dockerfile. It is a requirement that the Dockerfile must start with the `FROM` command. Images are created in layers, which means you can use another image as the base image for your own. The `FROM` command defines your base layer. As arguments, it takes the name of the image. Optionally, you can add the Docker Cloud username of the maintainer and image version, in the format `username/imagename:version`.

* `RUN` is used to build up the Image you're creating. For each `RUN` command, Docker will run the command then create a new layer of the image. This way you can roll back your image to previous states easily. The syntax for a `RUN` instruction is to place the full text of the shell command after the `RUN` (e.g., `RUN mkdir /user/local/foo`). This will automatically run in a `/bin/sh` shell. You can define a different shell like this: `RUN /bin/bash -c 'mkdir /user/local/foo'`

Expand All @@ -475,7 +475,7 @@ Here's a quick summary of the few basic commands we used in our Dockerfile.
>**Note:** The `EXPOSE` command does not actually make any ports accessible to the host! Instead, this requires
publishing ports by means of the `-p` flag when using `$ docker run`.

* `PUSH` pushes your image to Docker Hub, or alternately to a [private registry](https://docs.docker.com/registry/)
* `PUSH` pushes your image to Docker Cloud, or alternately to a [private registry](https://docs.docker.com/registry/)

>**Note:** If you want to learn more about Dockerfiles, check out [Best practices for writing Dockerfiles](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/).
Expand Down
2 changes: 1 addition & 1 deletion developer-tools/java/chapters/appb-troubleshooting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

=== Network Timed Out

Depending upon the network speed and restrictions, you may not be able to download Docker images from Docker Hub. The error message may look like:
Depending upon the network speed and restrictions, you may not be able to download Docker images from Docker Store. The error message may look like:

```console
$ docker pull arungupta/wildfly-mysql-javaee7
Expand Down
6 changes: 3 additions & 3 deletions developer-tools/java/chapters/ch02-basic-concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Docker has three main components:

. __Images__ are the *build component* of Docker and are the read-only templates defining an application operating system.
. __Containers__ are the *run component* of Docker and created from images. Containers can be run, started, stopped, moved, and deleted.
. Images are stored, shared, and managed in a __registry__ and are the *distribution component* of Docker. Docker Hub is a publicly available registry and is available at http://hub.docker.com.
. Images are stored, shared, and managed in a __registry__ and are the *distribution component* of Docker. Docker Store is a publicly available registry and is available at http://store.docker.com.

In order for these three components to work together, the *Docker Daemon* (or Docker Engine) runs on a host machine and does the heavy lifting of building, running, and distributing Docker containers. In addition, the *Client* is a Docker binary which accepts commands from the user and communicates back and forth with the Engine.

.Docker architecture
image::docker-architecture.png[]

The Client communicates with the Engine that is either co-located on the same host or on a different host. Client uses the `pull` command to request the Engine to pull an image from the registry. The Engine then downloads the image from Docker Hub, or whichever registry is configured. Multiple images can be downloaded from the registry and installed on the Engine. Client uses the `run` run the container.
The Client communicates with the Engine that is either co-located on the same host or on a different host. Client uses the `pull` command to request the Engine to pull an image from the registry. The Engine then downloads the image from Docker Store, or whichever registry is configured. Multiple images can be downloaded from the registry and installed on the Engine. Client uses the `run` run the container.

**How does a Docker Image work?**

Expand All @@ -39,7 +39,7 @@ One of the reasons Docker is so lightweight is because of these layers. When you

Every image starts from a base image, for example `ubuntu`, a base Ubuntu image, or `fedora`, a base Fedora image. You can also use images of your own as the basis for a new image, for example if you have a base Apache image you could use this as the base of all your web application images.

NOTE: By default, Docker obtains these base images from Docker Hub.
NOTE: By default, Docker obtains these base images from Docker Store.

Docker images are then built from these base images using a simple, descriptive set of steps we call instructions. Each instruction creates a new layer in our image. Instructions include actions like:

Expand Down
2 changes: 1 addition & 1 deletion developer-tools/java/chapters/ch04-run-container.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

= Run a Docker Container

The first step in running any application using Docker is to run a container. There are plenty of images available at https://hub.docker.com[Docker Hub]. Docker client can simply run the container by giving the image. The client will check if the image already exists on Docker Host. If it exists then it'll run the containers, otherwise the host will first download the image.
The first step in running any application using Docker is to run a container. There are plenty of images available at https://store.docker.com[Docker Store]. Docker client can simply run the container by giving the image. The client will check if the image already exists on Docker Host. If it exists then it'll run the containers, otherwise the host will first download the image.

== Pull Image

Expand Down
Loading

0 comments on commit f0e9964

Please sign in to comment.