$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS演習(4)- Docker・OSコンテナ
Search
axi-sugiki
February 05, 2019
Education
0
44
AWS演習(4)- Docker・OSコンテナ
授業の演習で使用した資料です.一コマの演習,また2年生を対象とした演習で,1年生では専門教育を行わず,2年生から学部・学科に配属されるため,この辺りに水準を合わせています.
axi-sugiki
February 05, 2019
Tweet
Share
More Decks by axi-sugiki
See All by axi-sugiki
AWS演習(1)- EC2インスタンスの作成
axisugiki
0
70
AWS演習(2)- DLAMI・Jupyter Notebook・TensorFlow
axisugiki
0
48
AWS演習(3)- GitHub・ソーシャルコーディング
axisugiki
0
29
AWS演習(未実施)- Rekognition・Lambda・S3
axisugiki
0
70
AWS演習(未実施)- EMR・MapReduce
axisugiki
1
29
AWS演習_未7.pdf
axisugiki
0
52
Other Decks in Education
See All in Education
自分だけの、誰も想像できないキャリアの育て方 〜偶然から始めるキャリアプラン〜 / Career planning starting by luckly v2
vtryo
1
350
Node-REDで広がるプログラミング教育の可能性
ueponx
1
220
中央教育審議会 教育課程企画特別部会 情報・技術ワーキンググループに向けた提言 ー次期学習指導要領での情報活用能力の抜本的向上に向けてー
codeforeveryone
0
480
AIは若者の成長機会を奪うのか?
frievea
0
140
1216
cbtlibrary
0
120
TeXで変える教育現場
doratex
0
5.5k
Measuring your measuring
jonoalderson
0
110
Evaluation Methods - Lecture 6 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
1.2k
令和エンジニアの学習法 〜 生成AIを使って挫折を回避する 〜
moriga_yuduru
0
190
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
PRO
4
17k
アジャイルの知見から新卒研修作り、そして組織作り
pokotyamu
0
120
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
150
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
190
How Software Deployment tools have changed in the past 20 years
geshan
0
30k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
200
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
The Cult of Friendly URLs
andyhume
79
6.7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
Transcript
AWS4 DOCKER axi-sugiki
#!$( ◦ Docker ◦ OS ") ◦
'% ◦ Kubernetes ◦ & ◦ * + , '% 2
Docker ◦ '$OS %- ◦ 3Containers4 ◦ 12,03$"/(4 %-
◦ ! &# &3EC24 + 3 )* &3)*  OS (Linux/win) OS (Linux/win) Docker Engine3OS  EC2 EC2 OS. (OS&#) . (&#)
Docker $%"01/31 ◦ EC2$$ &+ ◦ )-EC2$$ 1(/' ◦
AMI3Amazon Linux 2 AMI(64 bit, x86) ◦ $$3t2.medium(2, 4GiB) ◦ !"%3Web Security Group ◦ 3 ◦ Name3docker-0 %*1 ◦ Owner3 0 %*1 ◦ %3 ◦ ,.&+2$#% 4
Docker "#-2/3. ◦ Tera Term EC2 ""(+ ◦ /EC2IP ◦
#%/ec2-user ◦ #/-*). ◦ RSA/DSA, $/ ◦ "!## '& 5
Docker -3/3. ◦ Tera Term%(#/' ") $ sudo yum install
docker –y -Docker . $ sudo systemctl start docker -Docker+!. $ sudo usermod –aG docker ec2-user -ec2-user docker, . ◦ & /Tera Term%( ◦ * /$ ◦ $ docker ps 6
DockerD ='A1/2B ◦ 3% ='Acontainer runB 7
='*" Acontainer runB .;9 &@A--rmB $ .; /2A ,), echoB !1- A ,), centosB !<85 C DockerHub ! .;:4 2+7#? .;>A !(06 B
Docker@$;*>2/2? ◦ GitHub60DockerHub&+1 8 DockerHub >$" ? /bin/echo “Hello, Docker!”
#&!:73 >Docker.)4? %-95, Docker & EC2AMI60 Docker$><=-95,? $;* EC2$$;* 60 -9 &pull <=5,' $/2(-9 run$ pull 8*-9
Docker>,;1/2< ◦ /2;search< ◦ "*;image pull< 9 /2$ ;search< /2
97# 5-41 .&= )%+' ;6 08 !: < "*$;image pull< # container run"*(3
Docker& $2/2% ◦ ! $image ls% ◦
#$image rm% 10 " ! ! $image ls% #$image rm% # DockerHub
DockerS/ $!0,/K6O1/2P ◦ / $K6Ocontainer runP 11 / $K6;1 Ocontainer
runP !0,/K6@HO-dP )0"E8*&/O-p host:containerP O("80E/ $80E5? P / $:4 O<9Qtest-nginxP +0: O<9QnginxP !0,/OdaemonPS %-/# K6 CB '.R M> 2A Q=<9QI6F3K6R ODLS.7NQGJQ0% P
Docker9 ! 5&62/27 ◦ 5&# "4 '.6container ps7
12 5& "4'. *$6container ps7 ID 63&% -7 !) 5&1 /, )6/, +( 83 &% -7 ! % - EC2 IP 02 8Web!6nginx75&
Docker. " ◦ #+container stop, ◦ #'&$+container ps -a, ◦
*+container rm, 13 # +container stop, ID+), container ps-a ( ID+), * +rm, % !* -docker container rm –f [name or id]
Docker@# 2:4 ;(=1/2> ◦ # 2:4 ;(=TTY36> 14 #& !
&195 #08,%=run> 2:4;(=-it> # +' = -*?centos> $+ #& 08 # #& ls#08 Ctrl-p?Ctrl-q #&<7 ="##/ .)> "# #& .)
Docker/ '"(,2/2- ◦ ( & ◦ $,container attach-
◦ *,container rm- 15 +%,detach- .( $,container attach- ID, )- #, !- *,container rm-
# ◦ WordPress4$ ◦ ,0 ◦ '3 ◦
MySQL86 +17 ◦ WordPress8Web6 (!7 ◦ TensorFlow4$ ◦ TensorFlow5/.& ,0 ◦ "*DLAMI-2 %.& ) 16
-*+FWordPressA.C1/3D ◦ MySQLC' 'D&A. ◦ WordPress&A. 17 <23754C-eD C%'/@39 D
#'54 C10E'$&554E ) latest(:8;) D "',B54C-p host:guestD !80=&80= 6? test-mysql& mysql& 6?5> MySQL& WordPress&(A.
'$%?WordPress:*=2/3> ◦ WordPress(28, ◦ EC2 IP15 18 IP &)
79 <0 " #+ ;-8, # =. !/6> # &) 34 !! !
1WordPress +.3/3/ ◦ WordPress + 19 *&$- '!($- /wp-login.php )
# 0% ,WordPress"
3TensorFlow /"11/22 ◦ TensorFlow Docker /" ◦ /" +. ◦
Jupyter Notebook (, #' 20 ! %1container logs2 *&(,URL! 1$ 0 localhost-)2
%#$?TensorFlow 7(<2/2= ◦ Tera TermSSH896+<"' )/= ◦ !?!88882 ◦ !?!88882>127.0.0.1
◦ WebJupyter ,5 21 &1 >4.;TensorFlow :30*-
&6>Docker Desktop for Windows/Mac ◦ DockerPC 5! '7 ◦ Community
Edition;2"< =%# 07/ ◦ Docker - +8 ◦ Windows Hyper-V=Mac HyperKit3 ◦ Linux 4.+8)( 1:= *, ◦ Kubernetes 9$'7 22
◦ EC2
23