Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
20190823_DockerMeetupKansai__4.pdf
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
nezumisannn
August 23, 2019
Technology
500
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20190823_DockerMeetupKansai__4.pdf
nezumisannn
August 23, 2019
Transcript
18 slides
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
More Decks by nezumisannn
See All by nezumisannn
20250930_Conohaウェビナー_生成AI_Terraform_ConoHa_VPSサーバー_セットアップ入門編
nezumisannn
1
48
20250723_Conohaウェビナー_高騰する海外クラウド費用を劇的カット_サーバーコスト最適化のポイント解説と成功事例のご紹介.pdf
nezumisannn
0
74
20241204_ビヨンド勉強会_44_AWS_Service_Catalogを利用したIaCのテンプレート化とTerraformによるデプロイ.pdf
nezumisannn
0
440
20240828_ビヨンド勉強会_42_EKS_on_FargateでWebサービスを公開するために覚えておきたいこと.pdf
nezumisannn
0
120
20240530_ビヨンド勉強会#41_ビヨンドのエンジニア新卒研修における取り組み
nezumisannn
0
140
20230511_AWSにおけるコンテナサービスの選択とIaC実装例.pdf
nezumisannn
0
1.5k
リーダーになって1年経過して_取り組んできたことと大事にしている考え方_の裏側_.pdf
nezumisannn
0
98
20211118_GKEにおける高負荷時のPodとWorker_Nodeの挙動について.pdf
nezumisannn
0
200
20211014_Alibaba_Cloud_Container_Service_for_KubernetesにおけるServerless_Kubernetesの概要とManaged_Kubernetesとの違い.pdf
nezumisannn
0
120
Other Decks in Technology
See All in Technology
コピーオンライト型ファイルシステムと ランダム書き込み
sat
PRO
2
140
Metadata - Section 4 : MODS (Metadata Object Description Schema )
mohab1
0
110
人の努力に頼らないセキュリティをエンジニアリングする在り方 / An approach to engineering security that does not rely on human effort
carta_engineering
0
240
New Relicのアラート対応をClaude Codeで自動修正するワークフローを作った話
manabuseki
2
650
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
3
920
Del vibe coding a un Desarrollo (agéntico) fiable
jcabot
0
220
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
440
AWS DevOps Agentの構造から読み解く運用 AI エージェントの設計原則/aws-devops-agent-design-principles
tomoki10
0
280
信頼性を犠牲にせず、PR マージからデプロイまで人の介入を完全にゼロにするまでの道のり
knwoop
4
2.1k
kubellの最新データ分析環境
kubell_hr
2
270
AI-DLCでソフトウェア開発の速さは 上がったのか?
rfdnxbro
0
150
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
130
Featured
See All Featured
KATA
mclloyd
PRO
35
16k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
580
The browser strikes back
jonoalderson
0
2k
Practical Orchestrator
shlominoach
192
12k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
Speed Design
sergeychernyshev
33
2.3k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
61k