Merge pull request #13376 from docker/master

Publish updates from master
This commit is contained in:
Usha Mandya 2021-08-19 10:34:10 +01:00 committed by GitHub
commit 0135b690fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 89 additions and 85 deletions

View File

@ -1353,7 +1353,7 @@ manuals:
- path: /docker-hub/service-accounts/
title: Service accounts
- path: /docker-hub/official_images/
title: Official images
title: Docker Official images
- sectiontitle: Automated builds
section:
- path: /docker-hub/builds/
@ -1399,7 +1399,7 @@ manuals:
- path: /docker-hub/deactivate-account/
title: Deactivate an account or an organization
- path: /docker-hub/publish/
title: Verified Publisher Program
title: Docker Verified Publisher Program
- path: /docker-hub/release-notes/
title: Release notes
- sectiontitle: Docker subscription

View File

@ -45,7 +45,7 @@
<ul class="footer_links">
<li><b><a href="https://www.docker.com/products/docker-desktop">Pricing</a></b></li>
<li><a href="https://www.docker.com/pricing/faq">FAQs</a></li>
<li><a href="https://www.docker.com/partners/programs">Verified Publisher Program</a></li>
<li><a href="https://www.docker.com/partners/programs">Docker Verified Publisher Program</a></li>
</ul>
</div>
<div class="col-xs-12 col-sm-3 col-md-3">

View File

@ -14,7 +14,7 @@ operating systems, such as Windows.
When running an image with multi-architecture support, `docker` automatically
selects the image variant that matches your OS and architecture.
Most of the official images on Docker Hub provide a [variety of architectures](https://github.com/docker-library/official-images#architectures-other-than-amd64){: target="_blank" rel="noopener" class="_" }.
Most of the Docker Official Images on Docker Hub provide a [variety of architectures](https://github.com/docker-library/official-images#architectures-other-than-amd64){: target="_blank" rel="noopener" class="_" }.
For example, the `busybox` image supports `amd64`, `arm32v5`, `arm32v6`,
`arm32v7`, `arm64v8`, `i386`, `ppc64le`, and `s390x`. When running this image
on an `x86_64` / `amd64` machine, the `x86_64` variant is pulled and run.

View File

@ -102,7 +102,6 @@ This example creates the hello-world image used in the tutorials.
If you want to test it out, you can clone
[the image repo](https://github.com/docker-library/hello-world).
## More resources
There are lots of resources available to help you write your `Dockerfile`.
@ -110,4 +109,4 @@ There are lots of 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 Image, be sure to read up on Docker's [Official Images](../../docker-hub/official_images.md).
* If your goal is to create a new Docker Official Image, read [Docker Official Images](../../docker-hub/official_images.md).

View File

@ -908,7 +908,7 @@ 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 Images
## Examples of Docker Official Images
These Official Images have exemplary `Dockerfile`s:
@ -922,6 +922,6 @@ These Official Images have exemplary `Dockerfile`s:
* [Dockerfile Reference](../../engine/reference/builder.md)
* [More about Base Images](baseimages.md)
* [More about Automated Builds](../../docker-hub/builds/index.md)
* [Guidelines for Creating Official Images](../../docker-hub/official_images.md)
* [Guidelines for Creating Docker Official Images](../../docker-hub/official_images.md)
* [Best practices to containerize Node.js web applications with Docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker){:target="_blank" rel="noopener" class="_"}

View File

@ -87,9 +87,9 @@ Docker Hub provides the following major features:
* [Repositories](repos.md): Push and pull container images.
* [Teams & Organizations](orgs.md): Manage access to private
repositories of container images.
* [Official Images](official_images.md): Pull and use high-quality
* [Docker Official Images](official_images.md): Pull and use high-quality
container images provided by Docker.
* [Publisher Images](publish/customer_faq.md): Pull and use high-
* [Docker Verified Publisher Images](publish/index.md): Pull and use high-
quality container images provided by external vendors.
* [Builds](builds/index.md): Automatically build container images from
GitHub and Bitbucket and push them to Docker Hub.

View File

@ -1,18 +1,18 @@
---
description: Guidelines for Official Images on Docker Hub
keywords: Docker, docker, registry, accounts, plans, Dockerfile, Docker Hub, docs, official,image, documentation
title: Official Images on Docker Hub
title: Docker Official Images
redirect_from:
- /docker-hub/official_repos/
---
The Docker [Official Images](https://hub.docker.com/search?q=&type=image&image_filter=official) are a
The [Docker Official Images](https://hub.docker.com/search?q=&type=image&image_filter=official){:target="_blank" rel="noopener" class="_"} are a
curated set of Docker repositories hosted on Docker Hub. They are
designed to:
* Provide essential base OS repositories (for example,
[ubuntu](https://hub.docker.com/_/ubuntu/),
[centos](https://hub.docker.com/_/centos/)) that serve as the
[ubuntu](https://hub.docker.com/_/ubuntu/){:target="_blank" rel="noopener" class="_"},
[centos](https://hub.docker.com/_/centos/){:target="_blank" rel="noopener" class="_"}) that serve as the
starting point for the majority of users.
* Provide drop-in solutions for popular programming language runtimes, data
@ -24,17 +24,17 @@ designed to:
authors.
* Ensure that security updates are applied in a timely manner. This is
particularly important as Official Images are some of the most
particularly important as Docker 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 Images. This team works in
publishing all content in the Docker 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 Images, this is not a strict requirement. Creating
and maintaining images for Official Images is a collaborative process. It takes
corresponding Docker Official Images, this is not a strict requirement. Creating
and maintaining images for Docker Official Images is a collaborative 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 Image.
@ -43,14 +43,14 @@ Official Image.
>
> Docker Official Images are an intellectual property of Docker. Distributing Docker Official Images without a prior agreement can constitute a violation of [Docker Terms of Service](https://www.docker.com/legal/docker-terms-service){: target="blank" rel="noopener" class=“”}.
## When to use Official Images
## When to use Docker Official Images
If you are new to Docker, we recommend that you use the Official Images in your
If you are new to Docker, we recommend that you use the Docker Official Images in your
projects. These images have clear documentation, promote best practices,
and are designed for the most common use cases. Advanced users can
review the Official Images as part of your `Dockerfile` learning process.
review Docker Official Images as part of your `Dockerfile` learning process.
A common rationale for diverging from Official Images is to optimize for
A common rationale for diverging from Docker 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
@ -64,39 +64,36 @@ 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.
## Submitting Feedback for Official Images
## Submitting Feedback for Docker Official Images
All Official Images contain a **User Feedback** section in their
All Docker 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 [Libera.Chat IRC](https://libera.chat).
## Creating an Official Image
## Creating a Docker Official Image
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:
* [docker-library/official-images](https://github.com/docker-library/official-images)
* [docker-library/official-images](https://github.com/docker-library/official-images){:target="_blank" rel="noopener" class="_"}
* [docker-library/docs](https://github.com/docker-library/docs)
* [docker-library/docs](https://github.com/docker-library/docs){:target="_blank" rel="noopener" class="_"}
The Official Images team, with help from community contributors, formally
The Docker 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 Image is "generally useful" to the larger Python developer
useful?" For example, the [python](https://hub.docker.com/_/python/){:target="_blank" rel="noopener" class="_"}
Docker Official Image is "generally useful" to the larger 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 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.
documentation on Docker Hub. Updates to the Docker Official Image follow the same pull request process, though with less review. The Docker 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

@ -13,10 +13,10 @@ redirect_from:
The Docker Verified and Publisher Program enables Independent Software Vendors (ISVs), development tools vendors, and platform providers to distribute Dockerized content through Docker Hub.
Development teams rely on Docker Hub for application components to build new applications. The Docker differentiated content programs like the [Official Images](../official_images.md) and the Verified Publishers provide developers with validation that these images come from trusted sources, reducing the risk of pulling malicious images from the impostor repositories.
Development teams rely on Docker Hub for application components to build new applications. The Docker differentiated content programs like the [Docker Official Images](../official_images.md) and the Docker Verified Publishers provide developers with validation that these images come from trusted sources, reducing the risk of pulling malicious images from the impostor repositories.
The Verified Publisher badge included on the Docker Hub repositories indicates that these repositories are published by Docker partners that are part of the Verified Publisher program, and are qualified to be included in the developer secure supply chain. You can limit your repository search, when you use the Verified Publisher filter.
The **Verified Publisher** badge included on the Docker Hub repositories indicates that these repositories are published by Docker partners that are part of the Verified Publisher program, and are qualified to be included in the developer secure supply chain. You can limit your repository search, when you use the 'Verified Publisher' filter.
To find out more about the Docker Verified and Publisher Program and to sign up for a partnership with Docker, visit the [Verified Publisher Program](https://www.docker.com/partners/programs){:target="_blank" rel="noopener" class="_"} page.
To find out more about the Docker Verified and Publisher Program and to sign up for a partnership with Docker, visit the [Docker Verified Publisher Program](https://www.docker.com/partners/programs){:target="_blank" rel="noopener" class="_"} page.
![Verification Badge](images/VerifiedPublisherBadge.png)

View File

@ -171,7 +171,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 images](official_images.md). The `/` character separates
[Docker Official Images](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>`:

View File

@ -947,7 +947,7 @@ adapting your image to take advantage of Docker secrets. One way to do this is
to ensure that each parameter you pass to the image when creating the container
can also be read from a file.
Many of the official images in the
Many of the Docker Official Images in the
[Docker library](https://github.com/docker-library/), such as the
[wordpress](https://github.com/docker-library/wordpress/)
image used in the above examples, have been updated in this way.
@ -1028,4 +1028,3 @@ for that secret data.
More information on short and long syntax for secrets can be found at
[Compose file version 3 reference](../../compose/compose-file/compose-file-v3.md#secrets).

View File

@ -42,38 +42,38 @@ see a few flaws in the Dockerfile below. But, don't worry. We'll go over them.
1. Create a file named `Dockerfile` in the same folder as the file `package.json` with the following contents.
```dockerfile
# syntax=docker/dockerfile:1
FROM node:12-alpine
RUN apk add --no-cache python g++ make
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
```
Please check that the file `Dockerfile` has no file extension like `.txt`. Some editors may append this file extension automatically and this would result in an error in the next step.
```dockerfile
# syntax=docker/dockerfile:1
FROM node:12-alpine
RUN apk add --no-cache python g++ make
WORKDIR /app
COPY . .
RUN yarn install --production
CMD ["node", "src/index.js"]
```
Please check that the file `Dockerfile` has no file extension like `.txt`. Some editors may append this file extension automatically and this would result in an error in the next step.
2. If you haven't already done so, open a terminal and go to the `app` directory with the `Dockerfile`. Now build the container image using the `docker build` command.
```console
$ docker build -t getting-started .
```
```console
$ docker build -t getting-started .
```
This command used the Dockerfile to build a new container image. You might
have noticed that a lot of "layers" were downloaded. This is because we instructed
the builder that we wanted to start from the `node:12-alpine` image. But, since we
didn't have that on our machine, that image needed to be downloaded.
This command used the Dockerfile to build a new container image. You might
have noticed that a lot of "layers" were downloaded. This is because we instructed
the builder that we wanted to start from the `node:12-alpine` image. But, since we
didn't have that on our machine, that image needed to be downloaded.
After the image was downloaded, we copied in our application and used `yarn` to
install our application's dependencies. The `CMD` directive specifies the default
command to run when starting a container from this image.
After the image was downloaded, we copied in our application and used `yarn` to
install our application's dependencies. The `CMD` directive specifies the default
command to run when starting a container from this image.
Finally, the `-t` flag tags our image. Think of this simply as a human-readable name
for the final image. Since we named the image `getting-started`, we can refer to that
image when we run a container.
Finally, the `-t` flag tags our image. Think of this simply as a human-readable name
for the final image. Since we named the image `getting-started`, we can refer to that
image when we run a container.
The `.` at the end of the `docker build` command tells that Docker should look for the `Dockerfile` in the current directory.
The `.` at the end of the `docker build` command tells that Docker should look for the `Dockerfile` in the current directory.
## Start an app container
@ -81,21 +81,21 @@ Now that we have an image, let's run the application. To do so, we will use the
command (remember that from earlier?).
1. Start your container using the `docker run` command and specify the name of the image we
just created:
just created:
```console
$ docker run -dp 3000:3000 getting-started
```
```console
$ docker run -dp 3000:3000 getting-started
```
Remember the `-d` and `-p` flags? We're running the new container in "detached" mode (in the
background) and creating a mapping between the host's port 3000 to the container's port 3000.
Without the port mapping, we wouldn't be able to access the application.
Remember the `-d` and `-p` flags? We're running the new container in "detached" mode (in the
background) and creating a mapping between the host's port 3000 to the container's port 3000.
Without the port mapping, we wouldn't be able to access the application.
2. After a few seconds, open your web browser to [http://localhost:3000](http://localhost:3000).
You should see our app.
You should see our app.
![Empty Todo List](images/todo-list-empty.png){: style="width:450px;margin-top:20px;"}
{: .text-center }
![Empty Todo List](images/todo-list-empty.png){: style="width:450px;margin-top:20px;"}
{: .text-center }
3. Go ahead and add an item or two and see that it works as you expect. You can mark items as
complete and remove items. Your frontend is successfully storing items in the backend.

View File

@ -56,8 +56,8 @@ For now, we will create the network first and attach the MySQL container at star
If you are using PowerShell then use this command.
```powershell
docker run -d `
```console
PS> docker run -d `
--network todo-app --network-alias mysql `
-v todo-mysql-data:/var/lib/mysql `
-e MYSQL_ROOT_PASSWORD=secret `
@ -80,7 +80,7 @@ For now, we will create the network first and attach the MySQL container at star
When the password prompt comes up, type in **secret**. In the MySQL shell, list the databases and verify
you see the `todos` database.
```cli
```console
mysql> SHOW DATABASES;
```
@ -194,8 +194,8 @@ With all of that explained, let's start our dev-ready container!
If you are using PowerShell then use this command.
```powershell
docker run -dp 3000:3000 `
```console
PS> docker run -dp 3000:3000 `
-w /app -v "$(pwd):/app" `
--network todo-app `
-e MYSQL_HOST=mysql `
@ -209,8 +209,7 @@ With all of that explained, let's start our dev-ready container!
2. If we look at the logs for the container (`docker logs <container-id>`), we should see a message indicating it's
using the mysql database.
```
# Previous log messages omitted
```console
$ nodemon src/index.js
[nodemon] 1.19.2
[nodemon] to restart at any time, enter `rs`
@ -231,7 +230,7 @@ With all of that explained, let's start our dev-ready container!
And in the mysql shell, run the following:
```plaintext
```console
mysql> select * from todo_items;
+--------------------------------------+--------------------+-----------+
| id | name | completed |

View File

@ -93,8 +93,8 @@ For Docker Desktop installation instructions, see [Install Docker Desktop on Mac
If you've already run the command to get started with the tutorial, congratulations! If not, open a command prompt or bash window, and run the command:
```cli
docker run -d -p 80:80 docker/getting-started
```console
$ docker run -d -p 80:80 docker/getting-started
```
You'll notice a few flags being used. Here's some more info on them:

View File

@ -215,4 +215,14 @@ ready(() => {
const group = $(this).attr("data-group");
$(`.nav-tabs > li > a[data-group='${ group }']`).tab("show");
});
$('.language-dockerfile span.k').tooltip({
title: function() {
let c = this.textContent;
this.style.cursor = 'help';
$(this).on('click', () => { window.location.href = "/engine/reference/builder/#"+c.toLowerCase()});
return 'Learn more about the "'+ c + '" Dockerfile command.'
},
placement: "auto"
});
});