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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
nezumisannn
August 23, 2019
Technology
490
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20190823_DockerMeetupKansai__4.pdf
nezumisannn
August 23, 2019
More Decks by nezumisannn
See All by nezumisannn
20250930_Conohaウェビナー_生成AI_Terraform_ConoHa_VPSサーバー_セットアップ入門編
nezumisannn
1
42
20250723_Conohaウェビナー_高騰する海外クラウド費用を劇的カット_サーバーコスト最適化のポイント解説と成功事例のご紹介.pdf
nezumisannn
0
61
20241204_ビヨンド勉強会_44_AWS_Service_Catalogを利用したIaCのテンプレート化とTerraformによるデプロイ.pdf
nezumisannn
0
420
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
94
20211118_GKEにおける高負荷時のPodとWorker_Nodeの挙動について.pdf
nezumisannn
0
190
20211014_Alibaba_Cloud_Container_Service_for_KubernetesにおけるServerless_Kubernetesの概要とManaged_Kubernetesとの違い.pdf
nezumisannn
0
120
Other Decks in Technology
See All in Technology
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
550
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
110
Kiro Crewをはじめよう
kizawa2020
1
110
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
680
Codex概要
ymiya55
0
480
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
340
20260930_Gemma4_Hands-on
tsho
0
240
ファミコンでPHPを動かす / PHP on the Famicom side b
tomzoh
0
140
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
510
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.5k
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
140
自分で立ててみるLLMサービス
y_sera15
0
150
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Rails Girls Zürich Keynote
gr2m
96
14k
Accessibility Awareness
sabderemane
1
240
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Test your architecture with Archunit
thirion
2
2.4k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
770
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
420
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
My Coaching Mixtape
mlcsv
0
340
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
450
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