Skip to content

Commit 8e07793

Browse files
committed
Merge pull request #8 from William-Yeh/v3.0-rc
第四梯次實作範例完成,請下載 - Lab materials completed for 4th Stage
2 parents 671a21f + 61ae636 commit 8e07793

30 files changed

+1417
-35
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ FYI, the `gh-pages` branch stores the slide files, mostly in markdown format.
3232
## History
3333

3434

35+
**v4.0** / 第四梯次 (2015-05-09)
36+
37+
- 簡化 Vagrant 虛擬機數量。
38+
- 增加「極簡化 Docker」實例,解釋 rootfs、dependency 與 isolation 性質。
39+
40+
3541
**v3.0** / 第三梯次 (2015-04-11)
3642

3743
- 簡化 Vagrant 環境設定程序。

Vagrantfile

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Vagrant.configure(2) do |config|
2828
for f in PROVISION_SCRIPTS
2929
node.vm.provision "shell", path: f
3030
end
31+
node.vm.provision "shell", inline: <<-SHELL
32+
sudo apt-get install -y tree
33+
SHELL
3134

3235
node.vm.provider "virtualbox" do |vb|
3336
vb.customize ["modifyvm", :id, "--memory", "1024"]
@@ -37,37 +40,6 @@ Vagrant.configure(2) do |config|
3740
end
3841

3942

40-
config.vm.define "alice" do |node|
41-
42-
node.vm.box = "williamyeh/ubuntu-trusty64-docker"
43-
node.vm.box_version = ">= 1.5.0"
44-
45-
node.vm.network "private_network", ip: "10.0.0.11"
46-
47-
node.vm.synced_folder ".", SYNCED_FOLDER
48-
49-
for f in PROVISION_SCRIPTS
50-
node.vm.provision "shell", path: f
51-
end
52-
53-
end
54-
55-
56-
config.vm.define "bob" do |node|
57-
58-
node.vm.box = "williamyeh/ubuntu-trusty64-docker"
59-
node.vm.box_version = ">= 1.5.0"
60-
61-
node.vm.network "private_network", ip: "10.0.0.12"
62-
63-
node.vm.synced_folder ".", SYNCED_FOLDER
64-
65-
for f in PROVISION_SCRIPTS
66-
node.vm.provision "shell", path: f
67-
end
68-
69-
end
70-
7143

7244
config.vm.define "centos" do |node|
7345
node.vm.box = "chef/centos-5.11"
@@ -78,6 +50,10 @@ Vagrant.configure(2) do |config|
7850
# [NOTE] unmark this while benchmarking VM startup time
7951
#node.vm.box_check_update = false
8052

53+
node.vm.provision "shell", inline: <<-SHELL
54+
sudo yum -y install tree
55+
SHELL
56+
8157
node.vm.provider "virtualbox" do |vb|
8258
vb.customize ["modifyvm", :id, "--memory", "256"]
8359
end

build-redis-mini/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src

build-redis-mini/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# a minimal Dockerized `redis-server`
2+
3+
FROM scratch
4+
5+
ADD rootfs.tar.gz /
6+
COPY redis.conf /etc/redis/redis.conf
7+
8+
# Redis port.
9+
EXPOSE 6379
10+
11+
12+
CMD ["redis-server"]

0 commit comments

Comments
 (0)