Rename official repos to official images

This commit is contained in:
Jeffrey Morgan 2018-11-21 15:19:50 -05:00
parent dacad06fbd
commit c0656fa7fa
12 changed files with 271 additions and 60 deletions

View File

@ -173,6 +173,8 @@ guides:
path: /get-started/part4/
- title: "Part 5: Stacks"
path: /get-started/part5/
- title: "Part 6: Deploy your app"
path: /get-started/part6/
- path: /engine/docker-overview/
title: Docker overview
- sectiontitle: Develop with Docker
@ -3631,8 +3633,8 @@ manuals:
title: Docker ID
- path: /docker-hub/repos/
title: Public Repositories
- path: /docker-hub/official_repos/
title: Official Repositories
- path: /docker-hub/official_images/
title: Official Images
- path: /docker-hub/orgs/
title: Teams & Organizations
- path: /docker-hub/webhooks/

View File

@ -119,4 +119,4 @@ There are lots more resources available to help you write your `Dockerfile`.
* There's a [complete guide to all the instructions](/engine/reference/builder.md) available for use in a `Dockerfile` in the reference section.
* To help you write a clear, readable, maintainable `Dockerfile`, we've also
written a [`Dockerfile` best practices guide](dockerfile_best-practices.md).
* If your goal is to create a new Official Repository, be sure to read up on Docker's [Official Repositories](/docker-hub/official_repos/).
* If your goal is to create a new Official Image, be sure to read up on Docker's [Official Images](/docker-hub/official_images/).

View File

@ -1,6 +1,6 @@
---
description: Hints, tips and guidelines for writing clean, reliable Dockerfiles
keywords: parent image, images, dockerfile, best practices, hub, official repo
keywords: parent image, images, dockerfile, best practices, hub, official image
redirect_from:
- /articles/dockerfile_best-practices/
- /engine/articles/dockerfile_best-practices/
@ -291,7 +291,7 @@ maintainable `Dockerfile`.
[Dockerfile reference for the FROM instruction](/engine/reference/builder.md#from)
Whenever possible, use current official repositories as the basis for your
Whenever possible, use current official images as the basis for your
images. We recommend the [Alpine image](https://hub.docker.com/_/alpine/) as it
is tightly controlled and small in size (currently under 5 MB), while still
being a full Linux distribution.
@ -766,9 +766,9 @@ fails catastrophically if the new build's context is missing the resource being
added. Adding a separate tag, as recommended above, helps mitigate this by
allowing the `Dockerfile` author to make a choice.
## Examples for Official Repositories
## Examples for Official Images
These Official Repositories have exemplary `Dockerfile`s:
These Official Images have exemplary `Dockerfile`s:
* [Go](https://hub.docker.com/_/golang/)
* [Perl](https://hub.docker.com/_/perl/)
@ -780,4 +780,4 @@ These Official Repositories have exemplary `Dockerfile`s:
* [Dockerfile Reference](/engine/reference/builder.md)
* [More about Base Images](baseimages.md)
* [More about Automated Builds](/docker-hub/builds/)
* [Guidelines for Creating Official Repositories](/docker-hub/official_repos/)
* [Guidelines for Creating Official Images](/docker-hub/official_images/)

View File

@ -207,7 +207,7 @@ To add a link:
2. In the Repository Links section, enter an image repository name.
A remote repository name should be either an official repository name such as `ubuntu` or a public repository name `namespace/repoName`.
A remote repository name should be either an official image name such as `ubuntu` or a public repository name `namespace/repoName`.
3. Press **Add**.

View File

@ -16,7 +16,7 @@ Docker Hub provides the following major features:
repositories allow you to share container images with your team. Public
repositories allow you to share them with anyone.
* [Teams & Organizations](/docker-hub/orgs.md): Manage access to private repositories.
* [Official Repositories](/docker-hub/official_repos.md): Pull & use high-quality container images provided by Docker.
* [Official Images](/docker-hub/official_images.md): Pull & use high-quality container images provided by Docker.
* [Publisher Images](/docker-hub/publish/customer_faq.md): Pull & use high-quality container
images provided by external vendors. Certified images also include support and guarantee
compatibility with Docker Enterprise.
@ -32,17 +32,17 @@ Start by creating an [account](/docker-hub/accounts.md) at [https://hub.docker.c
> **Note**: You can search for and pull Docker images from Hub without logging
> in, however to push images or share them with your team, you must log in.
## Find & Pull an Official Repositories
## Find & Pull an Official Image
Docker Hub contains a number of [Official
Repositories](http://hub.docker.com/explore/). These are curated repositories from vendors and contributors to Docker. They contain Docker images from vendors like Canonical, Oracle, and Elastic that you can use as the basis to build your applications and services.
With Official Repositories you know you're using an optimized and
With Official Images you know you're using an optimized and
up-to-date image that was built by experts to power your applications.
> **Note**: If you would like to contribute an Official Repository for your
> **Note**: If you would like to contribute an Official Image for your
> organization or product, see the documentation on
> [Official Repositories on Docker Hub](/docker-hub/official_repos.md) for more
> [Official Images on Docker Hub](/docker-hub/official_images.md) for more
> information.
## Create your first repository and push an image to it

View File

@ -1,10 +1,10 @@
---
description: Guidelines for Official Repositories on Docker Hub
description: Guidelines for Official Images on Docker Hub
keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, official,image, documentation
title: Official repositories on Docker Hub
title: Official Images on Docker Hub
---
The Docker [Official Repositories](https://hub.docker.com/official/) are a
The Docker [Official Images](https://hub.docker.com/search?q=&type=image&image_filter=official) are a
curated set of Docker repositories hosted on Docker Hub. They are
designed to:
@ -22,29 +22,29 @@ designed to:
authors.
* Ensure that security updates are applied in a timely manner. This is
particularly important as many Official Repositories are some of the most
particularly important as many Official Images are some of the most
popular on Docker Hub.
Docker, Inc. sponsors a dedicated team that is responsible for reviewing and
publishing all content in the official repositories. This team works in
publishing all content in the Official Images. This team works in
collaboration with upstream software maintainers, security experts, and the
broader Docker community.
While it is preferable to have upstream software authors maintaining their
corresponding Official Repositories, this is not a strict requirement. Creating
and maintaining images for Official Repositories is a public process. It takes
corresponding Official Images, this is not a strict requirement. Creating
and maintaining images for Official Images is a public process. It takes
place openly on GitHub where participation is encouraged. Anyone can provide
feedback, contribute code, suggest process changes, or even propose a new
Official Repository.
Official Image.
## Should I use Official Repositories?
## Should I use Official Images?
New Docker users are encouraged to use the Official Repositories in their
New Docker users are encouraged to use the Official Images in their
projects. These repositories have clear documentation, promote best practices,
and are designed for the most common use cases. Advanced users are encouraged to
review the Official Repositories as part of their `Dockerfile` learning process.
review the Official Images as part of their `Dockerfile` learning process.
A common rationale for diverging from Official Repositories is to optimize for
A common rationale for diverging from Official Images is to optimize for
image size. For instance, many of the programming language stack images contain
a complete build toolchain to support installation of modules that depend on
optimized code. An advanced user could build a custom image with just the
@ -54,13 +54,13 @@ A number of language stacks such as
[python](https://hub.docker.com/_/python/) and
[ruby](https://hub.docker.com/_/ruby/) have `-slim` tag variants
designed to fill the need for optimization. Even when these "slim" variants are
insufficient, it is still recommended to inherit from an Official Repository
insufficient, it is still recommended to inherit from an Official Image
base OS image to leverage the ongoing maintenance work, rather than duplicating
these efforts.
## How do I know the Official Repositories are secure?
## How do I know the Official Images are secure?
Each of the images in the Official Repositories is scanned for vulnerabilities. The results of
Each of the images in the Official Images is scanned for vulnerabilities. The results of
these security scans provide valuable information about which images contain
security vulnerabilities, and allow you to choose images that align with your
security standards.
@ -69,7 +69,7 @@ To view the Docker Security Scanning results:
1. Make sure you're logged in to Docker Hub.
You can view Official Images even while logged out, however the scan results are only available once you log in.
2. Navigate to the official repository whose security scan you want to view.
2. Navigate to the repository of the Official Image whose security scan you want to view.
3. Click the `Tags` tab to see a list of tags and their security scan summaries.
![Viewing CVEs from Docker images](images/scan-drilldown.gif)
@ -80,15 +80,15 @@ when you click an individual vulnerable component.
## How can I get involved?
All Official Repositories contain a **User Feedback** section in their
All Official Images contain a **User Feedback** section in their
documentation which covers the details for that specific repository. In most
cases, the GitHub repository which contains the Dockerfiles for an Official
Repository also has an active issue tracker. General feedback and support
questions should be directed to `#docker-library` on Freenode IRC.
## How do I create a new Official Repository?
## How do I create a new Official Image?
From a high level, an Official Repository starts out as a proposal in the form
From a high level, an Official Image starts out as a proposal in the form
of a set of GitHub pull requests. Detailed and objective proposal
requirements are documented in the following GitHub repositories:
@ -96,21 +96,21 @@ requirements are documented in the following GitHub repositories:
* [docker-library/docs](https://github.com/docker-library/docs)
The Official Repositories team, with help from community contributors, formally
The Official Images team, with help from community contributors, formally
review each proposal and provide feedback to the author. This initial review
process may require a bit of back and forth before the proposal is accepted.
There are also subjective considerations during the review process. These
subjective concerns boil down to the basic question: "is this image generally
useful?" For example, the [python](https://hub.docker.com/_/python/)
Official Repository is "generally useful" to the large Python developer
Official Image is "generally useful" to the large Python developer
community, whereas an obscure text adventure game written in Python last week is
not.
Once a new proposal is accepted, the author is responsible for keeping
their images up-to-date and responding to user feedback. The Official
Repositories team becomes responsible for publishing the images and
documentation on Docker Hub. Updates to the Official Repository follow the same
pull request process, though with less review. The Official Repositories team
documentation on Docker Hub. Updates to the Official Image follow the same
pull request process, though with less review. The Official Images team
ultimately acts as a gatekeeper for all changes, which helps mitigate the risk
of quality and security issues from being introduced.

View File

@ -22,7 +22,7 @@ You must use the tool, `inspectDockerImage`, to certify your content for publica
The `inspectDockerImage` tool does the following:
- Verifies that the Docker image was built from an image in the [Docker Official Repository](https://github.com/docker-library/repo-info/tree/master/repos)
- Verifies that the Docker image was built from an image in the [Docker Official Image](https://github.com/docker-library/repo-info/tree/master/repos)
- Inspects the Docker image for a Health Check. Although a Health Check is not required, it is recommended.

View File

@ -62,7 +62,7 @@ and guidelines listed below to build and deliver great content:
* [Best practices for writing Dockerfiles](/engine/userguide/eng-image/dockerfile_best-practices/)
* [Official repositories on Docker Hub](/docker-hub/official_repos/)
* [Official Images on Docker Hub](/docker-hub/official_images/)
* [Docker Bench for Security](https://github.com/docker/docker-bench-security){: target="_blank"
class="_"}

View File

@ -34,7 +34,7 @@ There you can see two example results: `centos` and `ansible/centos7-ansible`.
The second result shows that it comes from the public repository of a user,
named `ansible/`, while the first result, `centos`, doesn't explicitly list a
repository which means that it comes from the top-level namespace for [Official
Repositories](official_repos.md). The `/` character separates a user's
Images](/docker-hub/official_images.md). The `/` character separates a user's
repository from the image name.
Once you've found the image you want, you can download it with `docker pull <imagename>`:

228
get-started/part6.md Normal file
View File

@ -0,0 +1,228 @@
---
title: "Get Started, Part 6: Deploy your app"
keywords: deploy, production, datacenter, cloud, aws, azure, provider, admin, enterprise
description: Deploy your app to production using Docker CE or EE.
---
{% include_relative nav.html selected="6" %}
## Prerequisites
- [Install Docker](/install/index.md).
- Get [Docker Compose](/compose/overview.md) as described in [Part 3 prerequisites](/get-started/part3.md#prerequisites).
- Get [Docker Machine](/machine/overview.md) as described in [Part 4 prerequisites](/get-started/part4.md#prerequisites).
- Read the orientation in [Part 1](index.md).
- Learn how to create containers in [Part 2](part2.md).
- Make sure you have published the `friendlyhello` image you created by
[pushing it to a registry](/get-started/part2.md#share-your-image). We use that
shared image here.
- Be sure your image works as a deployed container. Run this command,
slotting in your info for `username`, `repo`, and `tag`: `docker run -p 80:80
username/repo:tag`, then visit `http://localhost/`.
- Have [the final version of `docker-compose.yml` from Part 5](/get-started/part5.md#persist-the-data) handy.
## Introduction
You've been editing the same Compose file for this entire tutorial. Well, we
have good news. That Compose file works just as well in production as it does
on your machine. Here, We go through some options for running your
Dockerized application.
## Choose an option
{% capture cloud %}
To set up and deploy:
- Install Docker Engine - Community
- Create your Swarm
- Deploy your app
### Install Docker Engine - Community
Find the [install instructions](/install/#supported-platforms) for Docker Engine - Community on the platform of your choice.
### Create your swarm
Run `docker swarm init` to create a swarm on the node.
### Deploy your app
Run `docker stack deploy -c docker-compose.yml getstartedlab` to deploy
the app on the cloud hosted swarm.
```shell
docker stack deploy -c docker-compose.yml getstartedlab
Creating network getstartedlab_webnet
Creating service getstartedlab_web
Creating service getstartedlab_visualizer
Creating service getstartedlab_redis
```
Your app is now running on your cloud provider.
#### Run some swarm commands to verify the deployment
You can use the swarm command line, as you've done already, to browse and manage
the swarm. Here are some examples that should look familiar by now:
* Use `docker node ls` to list the nodes.
```shell
[getstartedlab] ~ $ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
9442yi1zie2l34lj01frj3lsn ip-172-31-5-208.us-west-1.compute.internal Ready Active
jr02vg153pfx6jr0j66624e8a ip-172-31-6-237.us-west-1.compute.internal Ready Active
thpgwmoz3qefdvfzp7d9wzfvi ip-172-31-18-121.us-west-1.compute.internal Ready Active
n2bsny0r2b8fey6013kwnom3m * ip-172-31-20-217.us-west-1.compute.internal Ready Active Leader
```
* Use `docker service ls` to list services.
```shell
[getstartedlab] ~/sandbox/getstart $ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
x3jyx6uukog9 dockercloud-server-proxy global 1/1 dockercloud/server-proxy *:2376->2376/tcp
ioipby1vcxzm getstartedlab_redis replicated 0/1 redis:latest *:6379->6379/tcp
u5cxv7ppv5o0 getstartedlab_visualizer replicated 0/1 dockersamples/visualizer:stable *:8080->8080/tcp
vy7n2piyqrtr getstartedlab_web replicated 5/5 sam/getstarted:part6 *:80->80/tcp
```
* Use `docker service ps <service>` to view tasks for a service.
```shell
[getstartedlab] ~/sandbox/getstart $ docker service ps vy7n2piyqrtr
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
qrcd4a9lvjel getstartedlab_web.1 sam/getstarted:part6 ip-172-31-5-208.us-west-1.compute.internal Running Running 20 seconds ago
sknya8t4m51u getstartedlab_web.2 sam/getstarted:part6 ip-172-31-6-237.us-west-1.compute.internal Running Running 17 seconds ago
ia730lfnrslg getstartedlab_web.3 sam/getstarted:part6 ip-172-31-20-217.us-west-1.compute.internal Running Running 21 seconds ago
1edaa97h9u4k getstartedlab_web.4 sam/getstarted:part6 ip-172-31-18-121.us-west-1.compute.internal Running Running 21 seconds ago
uh64ez6ahuew getstartedlab_web.5 sam/getstarted:part6 ip-172-31-18-121.us-west-1.compute.internal Running Running 22 seconds ago
```
#### Open ports to services on cloud provider machines
At this point, your app is deployed as a swarm on your cloud provider servers,
as evidenced by the `docker` commands you just ran. But, you still need to
open ports on your cloud servers in order to:
* allow communication between the `redis` service and `web` service on
the worker nodes
* allow inbound traffic to the `web` service on the worker nodes so that
Hello World and Visualizer are accessible from a web browser.
* allow inbound SSH traffic on the server that is running the `manager` (this may be already set on your cloud provider)
{: id="table-of-ports"}
These are the ports you need to expose for each service:
| Service | Type | Protocol | Port |
| :--- | :--- | :--- | :--- |
| `web` | HTTP | TCP | 80 |
| `visualizer` | HTTP | TCP | 8080 |
| `redis` | TCP | TCP | 6379 |
Methods for doing this vary depending on your cloud provider.
We use Amazon Web Services (AWS) as an example.
> What about the redis service to persist data?
>
> To get the `redis` service working, you need to `ssh` into
the cloud server where the `manager` is running, and make a `data/`
directory in `/home/docker/` before you run `docker stack deploy`.
Another option is to change the data path in the `docker-stack.yml` to
a pre-existing path on the `manager` server. This example does not
include this step, so the `redis` service is not up in the example output.
### Iteration and cleanup
From here you can do everything you learned about in previous parts of the
tutorial.
* Scale the app by changing the `docker-compose.yml` file and redeploy
on-the-fly with the `docker stack deploy` command.
* Change the app behavior by editing code, then rebuild, and push the new image.
(To do this, follow the same steps you took earlier to [build the
app](part2.md#build-the-app) and [publish the
image](part2.md#publish-the-image)).
* You can tear down the stack with `docker stack rm`. For example:
```
docker stack rm getstartedlab
```
Unlike the scenario where you were running the swarm on local Docker machine
VMs, your swarm and any apps deployed on it continue to run on cloud
servers regardless of whether you shut down your local host.
{% endcapture %}
{% capture enterpriseboilerplate %}
Customers of Docker Enterprise Edition run a stable, commercially-supported
version of Docker Engine, and as an add-on they get our first-class management
software, Docker Datacenter. You can manage every aspect of your application
via UI using Universal Control Plane, run a private image registry with Docker
Trusted Registry, integrate with your LDAP provider, sign production images with
Docker Content Trust, and many other features.
{% endcapture %}
{% capture enterprisedeployapp %}
Once you're all set up and Docker Enterprise is running, you can [deploy your Compose
file from directly within the UI](/ee/ucp/swarm/deploy-multi-service-app/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Deploy app in UI');"}.
![Deploy an app on Docker Enterprise](/ee/ucp/images/deploy-multi-service-app-2.png)
After that, you can see it running, and can change any aspect of the application
you choose, or even edit the Compose file itself.
![Managing app on Docker Enterprise](/ee/ucp/images/deploy-multi-service-app-4.png)
{% endcapture %}
{% capture enterprise %}
{{ enterpriseboilerplate }}
Bringing your own server to Docker Enterprise and setting up Docker Datacenter
essentially involves two steps:
1. [Get Docker Enterprise for your server's OS from Docker Store](https://store.docker.com/search?offering=enterprise&type=edition){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Get Docker EE for your OS');"}.
2. Follow the [instructions to install Docker Enterprise on your own host](/datacenter/install/linux/){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'BYOH setup guide');"}.
> **Note**: Running Windows containers? View our [Windows Server setup guide](/install/windows/docker-ee.md){: onclick="ga('send', 'event', 'Get Started Referral', 'Enterprise', 'Windows Server setup guide');"}.
{{ enterprisedeployapp }}
{% endcapture %}
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#enterprise">Docker Enterprise</a></li>
<li><a data-toggle="tab" href="#community">Docker Engine - Community</a></li>
</ul>
<div class="tab-content">
<div id="community" class="tab-pane fade in active" markdown="1">{{ community }}</div>
<div id="enterprise" class="tab-pane fade" markdown="1">{{ enterprise }}</div>
</div>
## Congratulations!
You've taken a full-stack, dev-to-deploy tour of the entire Docker platform.
There is much more to the Docker platform than what was covered here, but you
have a good idea of the basics of containers, images, services, swarms, stacks,
scaling, load-balancing, volumes, and placement constraints.
Want to go deeper? Here are some resources we recommend:
- [Samples](/samples/): Our samples include multiple examples of popular software
running in containers, and some good labs that teach best practices.
- [User Guide](/engine/userguide/): The user guide has several examples that
explain networking and storage in greater depth than was covered here.
- [Admin Guide](/engine/admin/): Covers how to manage a Dockerized production
environment.
- [Training](https://training.docker.com/): Official Docker courses that offer
in-person instruction and virtual classroom environments.
- [Blog](https://blog.docker.com): Covers what's going on with Docker lately.

View File

@ -4,25 +4,6 @@ keywords: docker, machine, cloud, digital ocean
title: Digital Ocean example
---
<<<<<<< HEAD
=======
> Try out Docker Cloud!
>
> We suggest using [Docker Cloud](https://cloud.docker.com/) as the
most up-to-date way to run Docker on your cloud providers. To get started, see
[Docker Cloud docs home page](/docker-cloud/index.md), [Docker Cloud Settings
and Docker ID](/docker-cloud/dockerid.md), and [Link a DigitalOcean account to
Docker Cloud](/docker-cloud/infrastructure/link-do.md). If you are running Edge
channel Docker for Mac or Windows, you can access your Docker Cloud account from
those Docker desktop applications. See Docker Cloud (Edge feature) on
[Mac](/docker-for-mac/index.md#docker-cloud-edge-feature) or
[Windows](/docker-for-windows/index.md#docker-cloud-edge-feature).
>
> Docker Machine still works as described below, but Docker Cloud
supersedes Machine for this purpose.
{: .important}
>>>>>>> master
Follow along with this example to create a Dockerized [Digital Ocean](https://digitalocean.com) Droplet (cloud host).
### Step 1. Create a Digital Ocean account

View File

@ -35,7 +35,7 @@ enable Notary to run in a multi-tenant fashion, you must use this format
when interacting with Docker Hub through the Notary client. When specifying
Docker image names for the Notary client, the GUN format is:
- For official images (identifiable by the "Official Repository" moniker), the
- For official images (identifiable by the "Official Image" moniker), the
image name as displayed on Docker Hub, prefixed with `docker.io/library/`. For
example, if you would normally type `docker pull ubuntu` you must enter `notary
{cmd} docker.io/library/ubuntu`.