Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20190823_DockerMeetupKansai__4.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
nezumisannn
August 23, 2019
Technology
480
1
Share
20190823_DockerMeetupKansai__4.pdf
nezumisannn
August 23, 2019
More Decks by nezumisannn
See All by nezumisannn
20250930_Conohaウェビナー_生成AI_Terraform_ConoHa_VPSサーバー_セットアップ入門編
nezumisannn
1
35
20250723_Conohaウェビナー_高騰する海外クラウド費用を劇的カット_サーバーコスト最適化のポイント解説と成功事例のご紹介.pdf
nezumisannn
0
54
20241204_ビヨンド勉強会_44_AWS_Service_Catalogを利用したIaCのテンプレート化とTerraformによるデプロイ.pdf
nezumisannn
0
390
20240828_ビヨンド勉強会_42_EKS_on_FargateでWebサービスを公開するために覚えておきたいこと.pdf
nezumisannn
0
110
20240530_ビヨンド勉強会#41_ビヨンドのエンジニア新卒研修における取り組み
nezumisannn
0
130
20230511_AWSにおけるコンテナサービスの選択とIaC実装例.pdf
nezumisannn
0
1.4k
リーダーになって1年経過して_取り組んできたことと大事にしている考え方_の裏側_.pdf
nezumisannn
0
91
20211118_GKEにおける高負荷時のPodとWorker_Nodeの挙動について.pdf
nezumisannn
0
180
20211014_Alibaba_Cloud_Container_Service_for_KubernetesにおけるServerless_Kubernetesの概要とManaged_Kubernetesとの違い.pdf
nezumisannn
0
110
Other Decks in Technology
See All in Technology
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
7
1.1k
はじめてのDatadog
kairim0
0
260
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
370
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
240
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
370
コードレビューを制するチームがソフトウェアデリバリーのフローを制す / Beyond Code Review: Distributing Its Responsibilities Across the SDLC
mtx2s
3
710
自称宇宙最速で不合格となったAIP-C01にリベンジを果たすべくAIで問題集アプリを作ってみた。
yama3133
0
260
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.8k
Unlocking the Apps
pimterry
0
170
地元にいないローカルオーガナイザーの立ち回り
uvb_76
1
440
AI時代の私の技術インプットとアウトプット術
tonkotsuboy_com
16
8.2k
Claude Codeを組織で使いこなす— サーバサイドAIエージェント運用の実践知
techtekt
PRO
0
170
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Navigating Weather and Climate Data
rabernat
0
210
Skip the Path - Find Your Career Trail
mkilby
1
140
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
320
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
380
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Code Reviewing Like a Champion
maltzj
528
40k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Transcript
PackerでぱかっとDockerイメージを ビルドする Docker Meetup Kansai #4 寺岡 佑樹
はじめに ・LTなので気軽にお聞きくださいー ・本資料は後程公開します ・資料公開したらTwitterでハッシュタグ付きでつぶやきます
自己紹介 resource “my_profile” “nezumisannn” { name = “Yuki.Teraoka” nickname =
“ねずみさん家。” company = “beyond” job = “Site Reliability Engineer” twitter = “@yktr_sre” skills = [“terraform”,”packer”] }
Packerとは
Packerとは ・マシンイメージの自動生成と管理を行うツール ・HashiCorpが開発、Golangで記述されている
Packerで出来ること
Packerで出来ること ・Dockerイメージを含めた各種マシンイメージの自動生成 ・マシンイメージの構成をテンプレートとしてJsonで記述できる ・その他、AWSのAMIやVMwareにも対応
やってみよう
やってみよう ・dockerイメージをビルドしてElastic Container RegistryにPushする ・Packer用テンプレートの作成 ・テンプレートを指定してコマンドラインからPackerを実行
テンプレートの作成 { "variables" : { -> variables setting here },
"builders": [ -> builders settting here ], "provisioners" : [ -> provisioners setting here ], "post-processors" : [ -> post-processors setting here ] }
テンプレートの作成 ・variables ・テンプレートで利用する変数を指定 ・builders ・ビルドするイメージのタイプを指定 ・provisioners ・イメージに対してのプロビジョニング(Ansibleが利用できる) ・post-processors ・ビルドした結果から新しいアーティファクトを作成
variables "variables": { "ecr_registry_url": "XXXXXXXXXXXX.dkr.ecr.ap-northeast-1.amazonaws.com", "ecr_repository": "XXXXXXXXXXXX.dkr.ecr.ap-northeast-1.amazonaws.com/example-repo" "ecr_login_password": "{{env `ECR_LOGIN_PASSWORD`}}"
},
builders "builders": [ { "type": "docker", "image": "alpine:latest", "commit": true,
} ],
provisioners "provisioners": [ { "type": "ansible", "user": "root", "playbook_file": "./ansible/operation.yml"
} ],
post-processors "post-processors": [ [ { "type": "docker-tag", "repository": "{{user `ecr_repository`}}",
"tag": "latest" }, { "type": "docker-push", "ecr_login": true, "login_username": "AWS" "login_password": "{{user `ecr_login_password`}}" "login_server": "{{user `ecr_registry_url`}}" } ] ]
実行 ・コマンドラインからPackerを実行する ・packer build /path/to/template.json
まとめ ・DockerイメージのビルドはPackerを利用しよう ・皆様のdocker利用のお役に立てれば幸いです
END