-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version 20.10 * add sphinx textstyle * change css style * bump to v20.10 * update * update * update * update * bump to version 20.10 * hotfix * bump to version 20.10 - compose file formats * hotfix * update compose file docs * add Compose format v3 docs * 翻訳状況の反映 #380 * #380 docker builder を追加 * #380 docker compose リファレンスを追加 * #380 add docker config references * Fix typo (#382) * #380 add docker container command reference * #380 add docker context command reference * #380 add docker command references * #380 add docker command references * update rmi.rst * add commandline references * add commandline references * add commandline references * fix typo * update commandfile references * add command line references - docker plugins * add command line references - docker secret * add command line references - docker volumes * update docker-compose reference * update docker-compose references * fix typo * split samples.rst into multiple files * update samples * update docker stack reference * #380 update docker overview * fix: typo 颯太い to 相対 (#384) * fix typo * fix typo * #380 update get-docker * update get started * update get-started guide * add language-specific guide * update /develop/ articles * fix rest * hotfix * hotfix * add /ci-cd/ * add /cloud/ * update orchestration docs * update /config/ docs * update /config/ daemon and containers docs * update logging docs * update swarm docs * update network documents * update storage docs * update storage docs - bind mounts * fix typo * update storage docs - tmpfs mounts * update storage docs - storage driver * update storage docs - storage driver documents * update educational resources * update Docker Desktop docs * update Docker Desktop for Mac docs * fix rest * update Docker Desktop for Mac docs * fix typo * update Docker Desktop for Windows docs * check pointer * #380 * fix typo (#387) * 細部の変更 * fix typo * update * hotfix rest * update /compose/ documents * add Compose Specofication file * add compose spec build and deploy rst * fix typo * update date * fix reSt * Fix documentation (#393) * Fix typo 誤字修正: 島須 => します * Insert space * Fix typo (#395) ADD -> COPY * RP from other branch #349 * Added new installation instructions for Docker Desktop Co-authored-by: pataiji <pataiji@users.noreply.github.com> Co-authored-by: 水上 皓登 <nainaistar@gmail.com> Co-authored-by: uraitakahito <63381712+uraitakahito@users.noreply.github.com> Co-authored-by: Koichi <43988362+koh1project@users.noreply.github.com> Co-authored-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
- Loading branch information
1 parent
acf3781
commit 6dc861b
Showing
513 changed files
with
64,567 additions
and
17,074 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ display_version = True | |
display_github = True | ||
github_user = zembutsu | ||
github_repo = docs.docker.jp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
.. -*- coding: utf-8 -*- | ||
.. URL: https://docs.docker.com/ci-cd/best-practices/ | ||
doc version: 20.10 | ||
https://github.com/docker/docker.github.io/blob/master/ci-cd/best-practices.md | ||
.. check date: 2022/04/26 | ||
.. Commits on Feb 23, 2022 77f5bef236f7707cf9523b7414d1c693bebec70f | ||
.. ----------------------------------------------------------------------------- | ||
.. Best practices for using Docker Hub for CI/CD | ||
.. _best-practices-for-using-docker-hub-for-ci-cd: | ||
|
||
================================================== | ||
CI/CD のために Docker Hub を使うベストプラクティス | ||
================================================== | ||
|
||
.. sidebar:: 目次 | ||
|
||
.. contents:: | ||
:depth: 2 | ||
:local: | ||
|
||
.. According to the 2020 Jetbrains developer survey , 44% of developers are now using some form of continuous integration and deployment with Docker containers. We understand that a large number of developers have got this set up using Docker Hub as their container registry for part of their workflow. This guide contains some best practices for doing this and provides guidance on how to get started. | ||
`2020 Jetbrains 開発者調査 <https://www.jetbrains.com/lp/devecosystem-2020/>`_ によると、現在、開発者の 44% が継続的インテグレーションと開発に Docker コンテナを使っています。これは、ワークフローの一部であるコンテナ レジストリとして、 Docker Hub を多くの開発者らが利用しているものと理解しています。このガイドで扱うのは、ワークフローのいくつかのベストプラクティスと、始め方の手引きです。 | ||
|
||
.. We have also heard feedback that given the changes Docker introduced relating to network egress and the number of pulls for free users, that there are questions around the best way to use Docker Hub as part of CI/CD workflows without hitting these limits. This guide covers best practices that improve your experience and uses a sensible consumption of Docker Hub which mitigates the risk of hitting these limits, and contains tips on how to increase the limits depending on your use case. | ||
また、私たちは `Docker が導入したネットワーク :ruby:`出力帯域 <egress>` と free ユーザに対する取得数の変更 <https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/>`_ に関連するフィードバックも耳にしています。ここでは、これらの制限にあたることなく、 CI/CD ワークフローの一部として Docker Hub を使うベストな方法に関連する疑問も扱います。このガイドでは扱うベストプラクティスには、それら制限にあたる危険性を回避しながら、Docker Hub の体験や合理的な使い方の改善についてや、各々の利用例によっては制限の増やし方に関する助言も含みます。 | ||
|
||
.. Inner and outer loops | ||
.. _inner-and-outer-loops: | ||
内部と外部のループ | ||
==================== | ||
|
||
.. To get started, one of the most important things when working with Docker and any CI/CD is to understand when you need to test with the CI, and when you can do this locally. At Docker, we think about how developers work in terms of their inner loop (code, build, run, test) and their outer loop (push changes, CI build, CI test, deployment). | ||
始めるにあたり、CI でテストが必要な場合や、CI をローカルでする場合に、Docker とあらゆる CI/CD とが、どのようにして動作するかの理解が最も重要です。Docker では、 :ruby:`内部ループ <inner loop>` の視点(コードを書き、構築し、実行し、テストする)と :ruby:`外部ループ <outer loop>` の視点(変更を push 、 CI で構築し、 CI でテストし、デプロイする)で、開発者がどのようにして働くかを考えました。 | ||
|
||
.. image:: ./images/inner-outer-loop.png | ||
:scale: 60% | ||
:alt: CI/CD の内部ループと外部ループ | ||
|
||
.. Before you think about optimizing your CI/CD, it is important to think about your inner loop and how it relates to the outer loop (the CI). We know that most users don’t prefer ‘debugging through the CI’. Therefore, it is better if your inner loop and outer loop are as similar as possible. We recommend that you run unit tests as part of your docker build command by adding a target for them in your Dockerfile. This way, as you are making changes and rebuilding locally, you can run the same unit tests you would run in the CI on your local machine using a simple command. | ||
CI/CD の最適化を考える前に、自分の内部ループと、それが外部ループとの関係(CI そのもの)について考えるのは重要です。大部分のユーザは「CI を通したデバッグ」を好まないと私たちは知っています。つまり、内部ループと外部ループを可能な限り似せるのが、より良いです。私たちは、ユニットテストを ``docker build`` コマンドの一部として行うよう、それらの対象を Dockerfile 内にいれるのを推奨します。この方法によって、ローカルでの変更や再構築ができるのと同様に、シンプルなコマンドを使って、ローカルマシン上の CI 内で同じユニットテストを実行できるでしょう。 | ||
|
||
.. The blog post Go development with Docker is a great example of how you can use tests in your Docker project and re-use them in the CI. This also creates a shorter feedback loop on issues and reduces the amount of pulls and builds your CI needs to do. | ||
ブログ投稿 `Go development with Docker <https://www.docker.com/blog/tag/go-env-series/>`_ には、Docker プロジェクト内でテストを利用し、それらを CI で再利用するための素晴らしい例があります。また、イシュー(issue)に基づく短いフィードバックループも作成しており、CI が必要とする pull と構築の量を減らしています。 | ||
|
||
.. Optimizing CI/CD deployments | ||
.. _optimizing-ci-cd-deployments: | ||
CI/CD デプロイの最適化 | ||
============================== | ||
|
||
.. Once you get into your actual outer loop and Docker Hub, there are a few things you can do to get the most of your CI and deliver the fastest Docker experience. | ||
いったん、実際の外部ループと Docker Hub に入れば、CI を最大限活用しと、より速い Docker 体験をもたらすためにできることがいくつかあります。 | ||
|
||
.. First and foremost, stay secure. When you are setting up your CI, ensure you are using a Docker Hub access token, rather than your password. | ||
第一かつ最も重要なのは、安全の維持です。CI をセットアップする時は、パスワードではなく、 Docker Hub のアクセストークンを確実に使ってください。 | ||
|
||
.. Note | ||
You can create new access tokens from your Security page on Docker Hub. | ||
.. note:: | ||
|
||
Docker Hub 上の `セキュリティ <https://hub.docker.com/settings/security>`_ ページから、新しい :ruby:`アクセス トークン <access token>` を作成できます。 | ||
|
||
.. Once you have created access tokens and have added it to a secrets store on your platform, you need to consider when to push and pull in your CI/CD, along with where from, depending on the change you are making. | ||
アクセストークンを作成し、プラットフォーム上のシークレットストアに追加したら、変更が発生した時に、いつ自分の CI/CD に push や pull するか、どこから行うかの検討が必要です。 | ||
|
||
.. The first thing you can do to reduce the build time and reduce your number of calls is make use of the build cache to reuse layers you have already pulled. You can do this on many platforms by using buildX (buildkits) caching functionality and whatever cache your platform provides. For example, see Optimizing the GitHub Actions workflow using build cache. | ||
第一にできるのは、構築回数をを減らし、呼び出す回数の現象であり、そのために **構築キャッシュ(build cache)** を使って既に取得済みのレイヤーを再利用します。buildX(buildkits)のキャッシュ機能を使えば、多くのプラットフォームでこれが行えるようになり、どこでもプラットフォームが提供するものをキャッシュできます。例として、 :ref:`構築キャッシュを使った GitHub Actions ワークフローの最適化 <github-actions-optimizing-the-workflow>` をご覧ください。 | ||
|
||
.. The other change you may want to make is only have your release images go to Docker Hub. This would mean setting up functions to push your PR images to a more local image store to be quickly pulled and tested, rather than promoting them all the way up to production. | ||
他の変更としては、 Docker Hub に持っていくのはリリースイメージのみにします。つまり、 PullRequest で push したイメージをローカルに保存し、より速く pull してテストする機能をセットアップするのを意味するものであり、すべてを本番環境に持っていくわけではありません。 | ||
|
||
.. Next steps | ||
次のステップ | ||
==================== | ||
|
||
.. We know there are a lot more tips and tricks for using Docker in CI. However, we think these are some of the important things, considering the Docker Hub rate limits. | ||
CI で Docker を使うにあたり、多くの助言やコツがあるのを知りました。しかしながら、ある種の重要な項目である :doc:`Docker Hub のレート制限(rate limits)</docker-hub/download-rate-limit>` を検討します。 | ||
|
||
.. Note | ||
If you are still experiencing issues with pull limits after you are authenticated, you can consider upgrading to a Docker subscription. | ||
.. note:: | ||
|
||
認証後に、 pull 制限の問題を既に経験している場合は、 `Docker サブスクリプション <https://www.docker.com/pricing>`_ へのアップグレードをご検討ください。 | ||
|
||
.. For information on how to configure GitHub Actions CI/CD pipeline, see Configure GitHub Actions. | ||
GitHub Actions CI/CD パイプラインの設定方法に関する情報は、 :doc:`GitHub Actions の設定 <github-actions>` をご覧ください。 | ||
|
||
.. seealso:: | ||
|
||
Best practices for using Docker Hub for CI/CD | ||
https://docs.docker.com/ci-cd/best-practices/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.. -*- coding: utf-8 -*- | ||
.. URL: https://docs.docker.com/ci-cd/github-actions/ | ||
doc version: 20.10 | ||
https://github.com/docker/docker.github.io/blob/master/ci-cd/github-actions.md | ||
.. check date: 2022/04/26 | ||
.. Commits on Feb 28, 2022 5e03b90d842947f7e2e8234dd9e80c9c3a98465d | ||
.. ----------------------------------------------------------------------------- | ||
.. Configure GitHub Actions | ||
.. _configure-github-actions: | ||
|
||
================================================== | ||
GitHub Actions の設定 | ||
================================================== | ||
|
||
.. sidebar:: 目次 | ||
|
||
.. contents:: | ||
:depth: 2 | ||
:local: | ||
|
||
.. This page guides you through the process of setting up a GitHub Action CI/CD pipeline with Docker. Before setting up a new pipeline, we recommend that you take a look at Ben’s blog on CI/CD best practices. | ||
このページでは、 Docker を使った GitHub Action CI/CD パイプラインの設定手順を説明します。新しいパイプラインを設定する前に、CI/CD のベストプラクティスに関する `Ben 氏のブログ <https://www.docker.com/blog/best-practices-for-using-docker-hub-for-ci-cd/>`_ をご覧いただくのを推奨します。 | ||
|
||
.. This guide contains instructions on how to: | ||
このガイドで扱う手順は、以下の方法です。 | ||
|
||
.. Use a sample Docker project as an example to configure GitHub Actions. | ||
Set up the GitHub Actions workflow. | ||
Optimize your workflow to reduce build time. | ||
Push only specific versions to Docker Hub. | ||
1. GitHub Actions を設定するための例として、サンプルの Docker プロジェクトを使う | ||
2. GitHub Actions ワークフローを設定する | ||
3. 構築回数を減らすようワークフローを最適化 | ||
4. 特定のバージョンのみ Docker Hub に送信 | ||
|
||
.. Set up a Docker project | ||
.. _github-actions-set-up-a-docker-project: | ||
Docker プロジェクトのセットアップ | ||
======================================== | ||
|
||
.. Let’s get started. This guide uses a simple Docker project as an example. The SimpleWhaleDemo repository contains a Nginx alpine image. You can either clone this repository, or use your own Docker project. | ||
それでは始めましょう。このガイドでは例としてシンプルな Docker プロジェクトを使います。 `SimpleWhaleDemo <https://github.com/usha-mandya/SimpleWhaleDemo>`_ リポジトリには、 Nginx alpine イメージを含みます。このリポジトリをクローンするか、自分の Docker プロジェクトを使います。 | ||
|
||
.. image:: ./images/simplewhaledemo.png | ||
:scale: 60% | ||
:alt: SimpleWhaleDemo | ||
|
||
.. Before we start, ensure you can access Docker Hub from any workflows you create. To do this: | ||
はじめる前に、作成するワークフローから `Docker Hub <https://hub.docker.com/>` へアクセスできるようにします。そのためには、以下の作業をします。 | ||
|
||
(以下TBD) | ||
|
||
|
||
.. seealso:: | ||
|
||
Configure GitHub Actions | ||
https://docs.docker.com/ci-cd/github-actions/ | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.. -*- coding: utf-8 -*- | ||
.. | ||
.. doc version: | ||
.. check date: 2021/04/26 | ||
.. ----------------------------------------------------------------------------- | ||
.. Set up CI/CD | ||
.. _set-up-ci-ci: | ||
|
||
======================================== | ||
CI/CD のセットアップ | ||
======================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:titlesonly: | ||
|
||
CI/CD ベストプラクティス <best-practices.rst> | ||
GitHub Actions 設定 <github-actions.rst> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.. -*- coding: utf-8 -*- | ||
.. | ||
.. doc version: | ||
.. check date: 2021/04/26 | ||
.. ----------------------------------------------------------------------------- | ||
.. Deploy your app to the cloud | ||
.. _deploy-your-app-to-the-cloud: | ||
|
||
======================================== | ||
アプリをクラウドにデプロイ | ||
======================================== | ||
|
||
(TBD) | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:titlesonly: | ||
|
||
aci-integration.rst | ||
aci-container-features.rst | ||
aci-compose-features.rst | ||
ecs-integration.rst | ||
ecs-architecture.rst | ||
ecs-compose-features.rst | ||
ecs-compose-examples.rst | ||
|
||
---- | ||
|
||
Deploying Docker containers on Azure | ||
https://docs.docker.com/cloud/aci-integration/ | ||
|
||
ACI integration container features | ||
https://docs.docker.com/cloud/aci-container-features/ | ||
|
||
ACI integration Compose features | ||
https://docs.docker.com/cloud/aci-compose-features/ | ||
|
||
Deploying Docker containers on ECS | ||
https://docs.docker.com/cloud/ecs-integration/ | ||
|
||
ECS integration architecture | ||
https://docs.docker.com/cloud/ecs-architecture/ | ||
|
||
ECS integration Compose features | ||
https://docs.docker.com/cloud/ecs-compose-features/ | ||
|
||
ECS integration composefile examples | ||
https://docs.docker.com/cloud/ecs-compose-examples/ | ||
|
Oops, something went wrong.