2
4

More than 5 years have passed since last update.

Docker for Azure: AzureでDockerを使う

Posted at

メモ

公式ドキュメント

Docker for Azure setup & prerequisites | Docker Documentation

上記ドキュメントをより効率的にできるように以下にまとめる

用語

  • Stable channel:
  • Edge channel:

コンテナ管理ツール

Azureでは、複数のDockerホスト(クラスタ)管理ツールは、以下の3つが使える

  • Docker Swarm:
  • Mesosphere DC/OS:
  • Kubernetes:

Service Principal

  • Service Principal: Azure APIを呼び出すために使われる
  1. ローカル環境にdocker4x/create-sp-azureの最新バージョンをダウンロード
docker pull docker4x/create-sp-azure:latest
  1. sp-azureを以下の引数で実行
$ docker run -ti docker4x/create-sp-azure sp-name [rg-name rg-region]

具体例

$ docker run -ti docker4x/create-sp-azure sp1 swarm1 japaneast

上記を実行するとログインをwebブラウザでの求められるので、表示されたコードを入力する。

info:    Executing command login
\info:    To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code XXXXXXXXX to authenticate.

SSH key

下記のカスタムデプロイ次にSSHの公開鍵が必要

ssh-keygen -t rsa -b 2048

参考: Azure での Linux VM 用の SSH キー ペアの作成と使用 | Microsoft Docs

Azure でのカスタムデプロイ

  • Azureのテンプレートを使ってカスタムデプロイすると、自動で起動する

上記で、無事立ち上がった。

 

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4