开箱即用的 SQL Server Docker
SQL Server 真是越來(lái)越有看頭。當(dāng)我們還在為 Linux 上運(yùn)行 SQL Server 而興奮的時(shí)候,SQL Server 已經(jīng)開(kāi)啟了 容器化之路,至此才能看清微軟的胸懷,開(kāi)始擁抱更大的世界。當(dāng)我越來(lái)越深入去閱讀有關(guān) Docker 容器的文檔,已然發(fā)現(xiàn)曾經(jīng)部署上千臺(tái) Linux MySQL 的場(chǎng)景,如今在 Docker 的幫助下,SQL Server 也是手到擒來(lái)。如果 SQL Server 再匹配一個(gè)分布式計(jì)算引擎,那也是分分鐘即可打造一個(gè)計(jì)算怪獸,和小象 Hadoop 分庭抗禮。屆時(shí)玩 SQL 的朋友們不用分心去折騰 Hadoop/Spark, 僅用 T-SQL 依然可以笑傲江湖。因?yàn)槿斯ぶ悄?#xff0c;機(jī)器學(xué)習(xí)算法本就是數(shù)據(jù)集合操作,天生和 SQL 結(jié)合緊密。不信看我的這篇:
機(jī)器學(xué)習(xí)算法之 KNN 的 SQL 實(shí)現(xiàn)
當(dāng)然,理想是要有的,目前還是將心放一放,回歸這次的主題, Docker.
 接觸容器化實(shí)踐,始于團(tuán)隊(duì) 2017 的 CRM 產(chǎn)品發(fā)布流程改革,微服務(wù)化。
現(xiàn)將整個(gè)過(guò)程梳理一下,對(duì) SQL Server 容器化進(jìn)程做一個(gè)明晰的總結(jié)。
- Docker 概念以及作用 
- Docker 用來(lái)發(fā)布 SQL Server 部署的方法和優(yōu)勢(shì) 
Docker 的概念以及作用
Docker 的安裝
安裝的必備條件:
AUFS
vfs
btrfs
默認(rèn)存儲(chǔ)驅(qū)動(dòng)是?Device?Mapper
檢查 Centos 版本:
[root@centos00?log]#?uname?-aLinux?centos00?3.10.0-514.el7.x86_64?#1?SMP?Tue?Nov?22?16:42:41?UTC?2016?x86_64?x86_64?x86_64?GNU/Linux
檢查存儲(chǔ)驅(qū)動(dòng):
[root@centos00?log]#?ls?-l?/sys/class/misc/device-mapperlrwxrwxrwx.?1?root?root?0?Aug?22?18:33?/sys/class/misc/device-mapper?->?../../devices/virtual/misc/device-mapper
或者直接查當(dāng)前運(yùn)行的設(shè)備
[root@centos00?log]#?grep?device-mapper?/proc/devices253?device-mapper
若沒(méi)有則運(yùn)行下面腳本安裝
yum?install?-y?device-mappermodprobe?dm_mod
安裝 EPEL 軟件包倉(cāng)庫(kù)
此倉(cāng)庫(kù)只是在 centos 上安裝 Docker 的時(shí)候需要,當(dāng)然 RedHat 也是同門(mén)。而 Fedora 則不需要,因?yàn)?EPEL 是 Fedora 出品,已經(jīng)包含了此庫(kù)。
https://fedoraproject.org/wiki/EPEL
EPEL: Extra Packages For Enterprise Linux
顧名思義,這是專(zhuān)門(mén)為企業(yè)版 Linux 打造的擴(kuò)展功能庫(kù)。
CentOS 6/7 安裝路徑各不相同:
yum?install?https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm而正式的安裝則簡(jiǎn)單的多:
yum?install?-y?dockerDocker 運(yùn)行時(shí)檢查:
[root@centos00?log]Cannot?connect?to?the?Docker?daemon?at?unix:///var/run/docker.sock.?Is?the?docker?daemon?running?
以上腳本可用來(lái)檢查 Docker 運(yùn)行時(shí)信息,亦可用來(lái)檢查 Docker 是否運(yùn)行
啟動(dòng) Docker 進(jìn)程以及配置開(kāi)機(jī)運(yùn)行 Docker :
systemctl?start?dockersystemctl?enable?docker
[root@centos00?log]#?systemctl?start?docker
Job?for?docker.service?failed?because?the?control?process?exited?with?error?code.?See?"systemctl?status?docker.service"?and?"journalctl?-xe"?for?details.
[root@centos00?log]#?systemctl?status?docker.service?-l
●?docker.service?-?Docker?Application?Container?Engine
???Loaded:?loaded?(/usr/lib/systemd/system/docker.service;?disabled;?vendor?preset:?disabled)
???Active:?failed?(Result:?exit-code)?since?Thu?2018-08-30?07:45:41?CST;?2min?19s?ago
?????Docs:?http://docs.docker.com
??Process:?31489?ExecStart=/usr/bin/dockerd-current?--add-runtime?docker-runc=/usr/libexec/docker/docker-runc-current?--default-runtime=docker-runc?--exec-opt?native.cgroupdriver=systemd?--userland-proxy-path=/usr/libexec/docker/docker-proxy-current?--init-path=/usr/libexec/docker/docker-init-current?--seccomp-profile=/etc/docker/seccomp.json?$OPTIONS?$DOCKER_STORAGE_OPTIONS?$DOCKER_NETWORK_OPTIONS?$ADD_REGISTRY?$BLOCK_REGISTRY?$INSECURE_REGISTRY?$REGISTRIES?(code=exited,?status=1/FAILURE)
?Main?PID:?31489?(code=exited,?status=1/FAILURE)
Aug?30?07:45:38?centos00?systemd[1]:?Starting?Docker?Application?Container?Engine...
Aug?30?07:45:38?centos00?dockerd-current[31489]:?time="2018-08-30T07:45:38.949026762+08:00"?level=warning?msg="could?not?change?group?/var/run/docker.sock?to?docker:?group?docker?not?found"
Aug?30?07:45:38?centos00?dockerd-current[31489]:?time="2018-08-30T07:45:38.954488551+08:00"?level=info?msg="libcontainerd:?new?containerd?process,?pid:?31496"
Aug?30?07:45:41?centos00?dockerd-current[31489]:?Error?starting?daemon:?SELinux?is?not?supported?with?the?overlay2?graph?driver?on?this?kernel.?Either?boot?into?a?newer?kernel?or?disable?selinux?in?docker?(--selinux-enabled=false)
Aug?30?07:45:41?centos00?systemd[1]:?docker.service:?main?process?exited,?code=exited,?status=1/FAILURE
Aug?30?07:45:41?centos00?systemd[1]:?Failed?to?start?Docker?Application?Container?Engine.
Aug?30?07:45:41?centos00?systemd[1]:?Unit?docker.service?entered?failed?state.
Aug?30?07:45:41?centos00?systemd[1]:?docker.service?failed.
參考這篇文章:
https://stackoverflow.com/questions/45461307/selinux-is-not-supported-with-the-overlay-graph-driver
執(zhí)行命令:
[root@centos00?log]#??cat?/etc/sysconfig/docker-storageDOCKER_STORAGE_OPTIONS="--storage-driver?overlay2?"
修改其 storage driver,使其應(yīng)用 devicemapper :
[root@centos00?log]#??cat?/etc/sysconfig/docker-storageDOCKER_STORAGE_OPTIONS="--storage-driver?devicemapper?"
再次啟動(dòng) docker, 并檢查 Docker 的狀態(tài)
[root@centos00?log]#?docker?infoContainers:?0
?Running:?0
?Paused:?0
?Stopped:?0
Images:?0
Server?Version:?1.13.1
Storage?Driver:?devicemapper
?Pool?Name:?docker-253:0-101679883-pool
?Pool?Blocksize:?65.54?kB
?Base?Device?Size:?10.74?GB
?Backing?Filesystem:?xfs
?Data?file:?/dev/loop0
?Metadata?file:?/dev/loop1
?Data?Space?Used:?11.8?MB
?Data?Space?Total:?107.4?GB
?Data?Space?Available:?29.25?GB
?Metadata?Space?Used:?581.6?kB
?Metadata?Space?Total:?2.147?GB
?Metadata?Space?Available:?2.147?GB
?Thin?Pool?Minimum?Free?Space:?10.74?GB
?Udev?Sync?Supported:?true
?Deferred?Removal?Enabled:?true
?Deferred?Deletion?Enabled:?true
?Deferred?Deleted?Device?Count:?0
?Data?loop?file:?/var/lib/docker/devicemapper/devicemapper/data
?WARNING:?Usage?of?loopback?devices?is?strongly?discouraged?for?production?use.?Use?`--storage-opt?dm.thinpooldev`?to?specify?a?custom?block?storage?device.
?Metadata?loop?file:?/var/lib/docker/devicemapper/devicemapper/metadata
?Library?Version:?1.02.135-RHEL7?(2016-09-28)
Logging?Driver:?journald
Cgroup?Driver:?systemd
Plugins:?
?Volume:?local
?Network:?bridge?host?macvlan?null?overlay
Swarm:?inactive
Runtimes:?runc?docker-runc
Default?Runtime:?docker-runc
Init?Binary:?/usr/libexec/docker/docker-init-current
containerd?version:??(expected:?aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc?version:?5eda6f6fd0c2884c2c8e78a6e7119e8d0ecedb77?(expected:?9df8b306d01f59d3a8029be411de015b7304dd8f)
init?version:?fec3683b971d9c3ef73f284f176672c44b448662?(expected:?949e6facb77383876aeff8a6944dde66b3089574)
Security?Options:
?seccomp
??WARNING:?You're?not?using?the?default?seccomp?profile
??Profile:?/etc/docker/seccomp.json
?selinux
Kernel?Version:?3.10.0-514.el7.x86_64
Operating?System:?CentOS?Linux?7?(Core)
OSType:?linux
Architecture:?x86_64
Number?of?Docker?Hooks:?3
CPUs:?4
Total?Memory:?3.699?GiB
Name:?centos00
ID:?DORM:3S6Z:Y33P:TWDH:MT52:NRJR:T5LY:MZYT:37MU:HP3O:JDTS:OFRE
Docker?Root?Dir:?/var/lib/docker
Debug?Mode?(client):?false
Debug?Mode?(server):?false
Registry:?https://index.docker.io/v1/
Experimental:?false
Insecure?Registries:
?127.0.0.0/8
Live?Restore?Enabled:?false
Registries:?docker.io?(secure)
創(chuàng)建一個(gè)容器:
[root@centos00?log]#?docker?run?-i?-t?ubuntu?/bin/bashUnable?to?find?image?'ubuntu:latest'?locally
Trying?to?pull?repository?docker.io/library/ubuntu?...?
latest:?Pulling?from?docker.io/library/ubuntu
124c757242f8:?Downloading?[===============================>???????????????????]?19.84?MB/31.76?MB
2ebc019eb4e2:?Download?complete?
dac0825f7ffb:?Download?complete?
82b0bb65d1bf:?Download?complete?
ef3b655c7f88:?Download?complete
這是簡(jiǎn)易版本的創(chuàng)建新容器的方式。如果容器不是遠(yuǎn)程服務(wù)器維護(hù)的,而在本地局域網(wǎng)(為了安全,放在本地局域網(wǎng)緩存),創(chuàng)立新容器的方法又有稍微不同。
當(dāng)命令執(zhí)行完畢,此時(shí)我們已經(jīng)在 Docker 新建的容器里面:
root@ecb9d7b74b07:~#?cat?/etc/hosts127.0.0.1????localhost
::1????localhost?ip6-localhost?ip6-loopback
fe00::0????ip6-localnet
ff00::0????ip6-mcastprefix
ff02::1????ip6-allnodes
ff02::2????ip6-allrouters
172.17.0.2????ecb9d7b74b07
另起一個(gè)窗口,檢查開(kāi)啟的容器
[root@centos00?huangyun]#?docker?ps?-aCONTAINER?ID????????IMAGE???????????????COMMAND?????????????CREATED?????????????STATUS??????????????PORTS???????????????NAMES
ecb9d7b74b07????????ubuntu??????????????"/bin/bash"?????????9?minutes?ago???????Up?9?minutes????????????????????????????vibrant_thompson
這是一個(gè)臨時(shí)起的容器,一旦退出執(zhí)行了 docker run -i -t ubuntu /bin/bash 的窗口,容器就隨之關(guān)閉了。
如果要建立一個(gè)長(zhǎng)久不關(guān)閉的容器,就需要執(zhí)行面的命令來(lái)安裝守護(hù)容器:
docker?run?--name?daemon_dave?-d?ubuntu?/bin/sh?-c?"while?true?;do?echo?hello?world;?sleep?1?;?done"
-d 標(biāo)識(shí)了此容器運(yùn)行在后臺(tái),命令執(zhí)行完之后,返回主機(jī)。
可以執(zhí)行下面的命令,連接后臺(tái)執(zhí)行的容器:
[root@centos00?huangyun]#?docker?exec?-i?-t?daemon_dave?/bin/bashroot@eb6cb2a3b7b6:/#?top
top?-?14:19:01?up?16:17,??0?users,??load?average:?0.29,?0.21,?0.20
Tasks:???4?total,???1?running,???3?sleeping,???0?stopped,???0?zombie
%Cpu(s):??0.6?us,??1.2?sy,??0.0?ni,?98.2?id,??0.0?wa,??0.0?hi,??0.0?si,??0.0?st
KiB?Mem?:??3878288?total,???114852?free,??2647828?used,??1115608?buff/cache
KiB?Swap:??2097148?total,??2092540?free,?????4608?used.???831552?avail?Mem
關(guān)閉一個(gè)容器:
執(zhí)行下面命令即可關(guān)閉一個(gè)正在運(yùn)行的容器:
[root@centos00?website]#?docker?stop??nginx_server_1nginx_server_1
[root@centos00?website]#?docker?ps
CONTAINER?ID????????IMAGE???????????????COMMAND?????????????CREATED?????????????STATUS??????????????PORTS???????????????NAMES
[root@centos00?website]#
docker ps 可以用來(lái)檢查當(dāng)前運(yùn)行著的容器。
以特定名字運(yùn)行一個(gè)容器之后,這名字就一直保存著,下次運(yùn)行,如果再以這份名字執(zhí)行相應(yīng)的運(yùn)行程序,會(huì)報(bào)如下的錯(cuò)誤:
[root@centos00?website]#?docker?run?-d?-p?80?--name?nginx_server_1?-v?/var/www/html/website:/var/www/html/website:rw?ubuntu/nginx3?/usr/bin/docker-current:?Error?response?from?daemon:?Conflict.?The?container?name?"/nginx_server_1"?is?already?in?use?by?container?f40d10674908782758915399d3f16f1c5207e2907cb90e25f3689bccb9449d34.?You?have?to?remove?(or?rename)?that?container?to?be?able?to?reuse?that?name..
See?'/usr/bin/docker-current?run?--help'.
不知道為什么 Docker 主程會(huì)一直保存著運(yùn)行過(guò)的 docker 名字:
[root@centos00?website]#?docker?ps?-aCONTAINER?ID????????IMAGE???????????????COMMAND??????????????????CREATED?????????????STATUS??????????????????????PORTS???????????????NAMES
17f8ba709f49????????ubuntu/nginx3???????"nginx"??????????????????4?minutes?ago???????Exited?(0)?3?minutes?ago????????????????????????hardcore_pare
f40d10674908????????ubuntu/nginx3???????"nginx"??????????????????10?hours?ago????????Exited?(0)?6?minutes?ago????????????????????????nginx_server_1
7baea86e09b2????????ubuntu/nginx2???????"/bin/sh"????????????????10?hours?ago????????Exited?(2)?10?hours?ago?????????????????????????determined_bartik
a4a3348bf5b4????????ubuntu/nginx2???????"/bin/sh"????????????????10?hours?ago????????Exited?(0)?10?hours?ago?????????????????????????quirky_keller
d944f39ba4b5????????ubuntu/nginx2???????"nginx"??????????????????10?hours?ago????????Exited?(1)?10?hours?ago?????????????????????????amazing_wozniak
498f38dab68d????????ubuntu/nginx2???????"nginx"??????????????????10?hours?ago????????Exited?(1)?10?hours?ago?????????????????????????website
e91147812d90????????ubuntu/nginx2???????"/bin/sh"????????????????11?hours?ago????????Exited?(0)?10?hours?ago?????????????????????????reverent_golick
b2dc934e76cb????????ubuntu/nginx2???????"/bin/sh"????????????????11?hours?ago????????Exited?(0)?11?hours?ago?????????????????????????nginx2
4389f303f89f????????ubuntu/ping?????????"/bin/sh"????????????????11?hours?ago????????Exited?(0)?11?hours?ago?????????????????????????dockernginx1
425db7295d54????????ubuntu/ping?????????"/bin/sh"????????????????11?hours?ago????????Exited?(0)?11?hours?ago?????????????????????????dockernginx
4092ee432cdc????????ubuntu/ping?????????"/bin/sh"????????????????11?hours?ago????????Exited?(0)?11?hours?ago?????????????????????????ubuntu00
2eedc14e316f????????c58e6a4eb329????????"/bin/sh?-c?'apt-g..."???11?hours?ago????????Exited?(100)?11?hours?ago???????????????????????nervous_stallman
8393f330888c????????ubuntu/nginx????????"/bin/bash"??????????????12?hours?ago????????Exited?(0)?12?hours?ago?????????????????????????gracious_leavitt
b106b1b31c84????????ubuntu/nginx????????"/bin/bash"??????????????13?hours?ago????????Exited?(127)?12?hours?ago???????????????????????nginx_server
6f748f358454????????ubuntu/ping?????????"/bin/bash"??????????????15?hours?ago????????Exited?(0)?15?hours?ago?????????????????????????compassionate_brahmagupta
e4a3a8acc032????????centos:7.4.1708?????"/bin/sh"????????????????17?hours?ago????????Exited?(0)?17?hours?ago?????????????????????????centos7
eb6cb2a3b7b6????????ubuntu??????????????"/bin/sh?-c?'while..."???2?days?ago??????????Exited?(137)?12?hours?ago???????????????????????daemon_dave
ecb9d7b74b07????????ubuntu??????????????"/bin/bash"??????????????2?days?ago??????????Exited?(127)?12?hours?ago???????????????????????vibrant_thompson
[root@centos00?website]#
當(dāng)再一次使用其中之一運(yùn)行容器時(shí),名字會(huì)因?yàn)橹貜?fù)而被拒絕運(yùn)行。
針對(duì)這種需要使用同一個(gè)名字重啟容器的情況,一般的解決方法有3種:
#?docker?rm?nginx_server_1
Docker 的鏡像與倉(cāng)庫(kù)
Docker 公司出版了自己維護(hù)和運(yùn)營(yíng)的一些鏡像,官方網(wǎng)站維護(hù)了這份列表:
https://hub.docker.com/
注冊(cè)一個(gè) Docker 官網(wǎng)的賬戶(hù) , dblenis, l*w*6.
每個(gè)倉(cāng)庫(kù)中都存放著各種鏡像,執(zhí)行命令,可以將這些鏡像都拉到本地存儲(chǔ):
[root@centos00?containers]#?docker?pull?centosUsing?default?tag:?latest
Trying?to?pull?repository?docker.io/library/centos?...?
latest:?Pulling?from?docker.io/library/centos
256b176beaff:?Pull?complete?
Digest:?sha256:6f6d986d425aeabdc3a02cb61c02abb2e78e57357e92417d6d58332856024faf
Status:?Downloaded?newer?image?for?docker.io/centos:latest
[root@centos00?containers]#?docker?images
REPOSITORY??????????TAG?????????????????IMAGE?ID????????????CREATED?????????????SIZE
docker.io/ubuntu????latest??????????????16508e5c265d????????9?days?ago??????????84.1?MB
docker.io/centos????latest??????????????5182e96772bf????????3?weeks?ago?????????200?MB
[root@centos00?containers]#
每個(gè)鏡像都會(huì)帶有自己的標(biāo)簽,在建立新容器的時(shí)候帶上這份標(biāo)簽,會(huì)讓我們更明白操作的對(duì)象是什么,會(huì)有什么異常:
[root@centos00?containers]#?docker?run?--name?centos7?-d?centos:centos7.4.1708???/bin/sh如果不指定特定標(biāo)簽,在拉取官網(wǎng)鏡像時(shí),則拉取的是最新的。
構(gòu)建鏡像
兩種方法:
使用 Docker Commit 命令
使用 Docker build 命令和 Dockerfile 文件
通過(guò)前面新建的 ubuntu 沒(méi)有 ping 的功能,我希望可以將 ping 功能安裝進(jìn)去,然后打包一個(gè)新的鏡像,放在 Docker 上分享。
Reading?package?lists...?Done
Building?dependency?tree???????
Reading?state?information...?Done
The?following?additional?packages?will?be?installed:
??libcap2?libcap2-bin?libidn11?libpam-cap
The?following?NEW?packages?will?be?installed:
??iputils-ping?libcap2?libcap2-bin?libidn11?libpam-cap
0?upgraded,?5?newly?installed,?0?to?remove?and?0?not?upgraded.
Need?to?get?140?kB?of?archives.
After?this?operation,?537?kB?of?additional?disk?space?will?be?used.
Do?you?want?to?continue??[Y/n]?y
apt-get 安裝一些其他軟件,方便以后使用,提交這些更改,將其完整的做成一個(gè)容器鏡像。以后若要新建容器,只需要在此鏡像基礎(chǔ)上新建便可。
[root@centos00?huangyun]#?docker?commit?daemon_dave?ubuntu/ping若此時(shí)查看鏡像庫(kù):
[root@centos00?huangyun]#?docker?imagesREPOSITORY??????????TAG?????????????????IMAGE?ID????????????CREATED?????????????SIZE
ubuntu/ping?????????latest??????????????2eb12722cb2f????????2?minutes?ago???????186?MB
docker.io/ubuntu????latest??????????????16508e5c265d????????9?days?ago??????????84.1?MB
docker.io/centos????7.4.1708????????????d3949e34634c????????3?weeks?ago?????????197?MB
docker.io/centos????centos7.4.1708??????d3949e34634c????????3?weeks?ago?????????197?MB
docker.io/centos????latest??????????????5182e96772bf????????3?weeks?ago?????????200?MB
發(fā)現(xiàn) repository 里面多了一個(gè) ubuntu/ping 的鏡像。
就像是虛擬機(jī)多保存了一個(gè) snapshot 一樣,更方便的是我們居然可以依據(jù)這份 snapshot 來(lái)構(gòu)建一個(gè)新的虛擬機(jī)。
官方更推薦使用 Dockerfile 和 Docker build 來(lái)構(gòu)建新容器鏡像
Dockerfile 是一種特殊的文件,用來(lái)編寫(xiě) DSL 指令,這些指令可以被 Docker 進(jìn)程識(shí)別,并根據(jù)這些指令進(jìn)行處理,最終完成一個(gè)可用的鏡像制作。每一個(gè)鏡像都是從基礎(chǔ)鏡像之上,一點(diǎn)點(diǎn)添加其他鏡像組成的。一開(kāi)始的基礎(chǔ)鏡像只是符合最低運(yùn)行庫(kù)的內(nèi)核,比如 ubuntu 的基礎(chǔ)鏡像,居然連 ping, vi 都沒(méi)有。如果需要這些功能作為新鏡像的一部分,那么就要在 Dockerfile 里面新加。
更多的 Dockerfile 支持的指令:
http://docs.docker.com/reference/builder
Docker build 就是基于 Dockerfile ,將其中的指令發(fā)送給 Docker 進(jìn)程,使其進(jìn)行構(gòu)建新鏡像。Docker 進(jìn)程可以看做是服務(wù)進(jìn)程,提供一系列的后臺(tái)服務(wù),docker build 就是客戶(hù)端,發(fā)送請(qǐng)求給 Docker ,Docker 統(tǒng)一調(diào)度工作完成 build 的請(qǐng)求。
[]FROM?ubuntu:14.04
MAINTAINER?Lenis?Huang?"huangyun_122@163.com"
RUN?apt-get?update
RUN?apt-get?install?-y?nginx
RUN?echo?"Hello,?World!"?>?/usr/share/nginx/html/index.html
EXPOSE?80
上面的腳本安裝了 nginx 服務(wù),并且創(chuàng)建了一個(gè)簡(jiǎn)單的靜態(tài)網(wǎng)頁(yè),最后允許 80 開(kāi)放給外界訪(fǎng)問(wèn)。
構(gòu)建開(kāi)始:
[root@centos00?DockerWeb]#?docker?build?-t="ubuntu/nginx"?.Sending?build?context?to?Docker?daemon?2.048?kB
Step?1/6?:?FROM?ubuntu:14.04
Trying?to?pull?repository?docker.io/library/ubuntu?...?
14.04:?Pulling?from?docker.io/library/ubuntu
72c01b436656:?Extracting?[=====>?????????????????????????????????????????????]?7.799?MB/67.13?MB
944f9cf63457:?Download?complete?
6856614e8780:?Download?complete?
9d0e4b6507f2:?Download?complete?
c00913272b9b:?Download?complete
正在 build 之中的鏡像,這一步步看的更詳細(xì):
[root@centos00?DockerWeb]#?docker?build?-t="ubuntu/nginx"?.Sending?build?context?to?Docker?daemon?2.048?kB
Step?1/6?:?FROM?ubuntu:14.04
Trying?to?pull?repository?docker.io/library/ubuntu?...?
14.04:?Pulling?from?docker.io/library/ubuntu
72c01b436656:?Pull?complete?
944f9cf63457:?Pull?complete?
6856614e8780:?Pull?complete?
9d0e4b6507f2:?Pull?complete?
c00913272b9b:?Pull?complete?
Digest:?sha256:d6b8e25d0f3073bad48fda3f28d01ac0e8bd0e2a6d034c7f462619591a72c791
Status:?Downloaded?newer?image?for?docker.io/ubuntu:14.04
?--->?8789038981bc
Step?2/6?:?MAINTAINER?Lenis?Huang?"huangyun_122@163.com"
?--->?Running?in?6a16f9906861
?--->?aacb0d62260f
Removing?intermediate?container?6a16f9906861
Step?3/6?:?RUN?apt-get?update
?--->?Running?in?ed843eeaf662
Ign?http://archive.ubuntu.com?trusty?InRelease
Get:1?http://security.ubuntu.com?trusty-security?InRelease?[65.9?kB]
Get:2?http://archive.ubuntu.com?trusty-updates?InRelease?[65.9?kB]
Get:3?http://archive.ubuntu.com?trusty-backports?InRelease?[65.9?kB]
Get:4?http://archive.ubuntu.com?trusty?Release.gpg?[933?B]
Get:5?http://security.ubuntu.com?trusty-security/main?amd64?Packages?[952?kB]
Get:6?http://archive.ubuntu.com?trusty-updates/universe?Sources?[260?kB]
Get:7?http://security.ubuntu.com?trusty-security/universe?Sources?[96.3?kB]
Get:8?http://archive.ubuntu.com?trusty-updates/main?amd64?Packages?[1372?kB]
Get:9?http://archive.ubuntu.com?trusty-updates/restricted?amd64?Packages?[21.4?kB]
Get:10?http://archive.ubuntu.com?trusty-updates/universe?amd64?Packages?[606?kB]
Get:11?http://archive.ubuntu.com?trusty-updates/multiverse?amd64?Packages?[16.0?kB]
Get:12?http://security.ubuntu.com?trusty-security/restricted?amd64?Packages?[18.1?kB]
Get:13?http://archive.ubuntu.com?trusty-backports/main?amd64?Packages?[14.7?kB]
Get:14?http://archive.ubuntu.com?trusty-backports/restricted?amd64?Packages?[40?B]
Get:15?http://archive.ubuntu.com?trusty-backports/universe?amd64?Packages?[52.5?kB]
Get:16?http://archive.ubuntu.com?trusty-backports/multiverse?amd64?Packages?[1392?B]
Get:17?http://archive.ubuntu.com?trusty?Release?[58.5?kB]
Get:18?http://archive.ubuntu.com?trusty/universe?Sources?[7926?kB]
Get:19?http://archive.ubuntu.com?trusty/main?amd64?Packages?[1743?kB]
Get:20?http://archive.ubuntu.com?trusty/restricted?amd64?Packages?[16.0?kB]
Get:21?http://archive.ubuntu.com?trusty/universe?amd64?Packages?[7589?kB]
Get:22?http://archive.ubuntu.com?trusty/multiverse?amd64?Packages?[169?kB]
Get:23?http://security.ubuntu.com?trusty-security/multiverse?amd64?Packages?[4721?B]
Get:24?http://security.ubuntu.com?trusty-security/universe?amd64?Packages?[311?kB]
Fetched?21.4?MB?in?11s?(1822?kB/s)
Reading?package?lists...
?--->?582a2a0c6fb9
Removing?intermediate?container?ed843eeaf662
Step?4/6?:?RUN?apt-get?install?-y?nginx
?--->?Running?in?7199f88e91ef
Reading?package?lists...
Building?dependency?tree...
Reading?state?information...
The?following?extra?packages?will?be?installed:
??fontconfig-config?fonts-dejavu-core?geoip-database?libfontconfig1
??libfreetype6?libgd3?libgeoip1?libjbig0?libjpeg-turbo8?libjpeg8?libtiff5
??libvpx1?libx11-6?libx11-data?libxau6?libxcb1?libxdmcp6?libxml2?libxpm4
??libxslt1.1?nginx-common?nginx-core?sgml-base?xml-core
Suggested?packages:
??libgd-tools?geoip-bin?fcgiwrap?nginx-doc?sgml-base-doc?debhelper
The?following?NEW?packages?will?be?installed:
??fontconfig-config?fonts-dejavu-core?geoip-database?libfontconfig1
??libfreetype6?libgd3?libgeoip1?libjbig0?libjpeg-turbo8?libjpeg8?libtiff5
??libvpx1?libx11-6?libx11-data?libxau6?libxcb1?libxdmcp6?libxml2?libxpm4
??libxslt1.1?nginx?nginx-common?nginx-core?sgml-base?xml-core
0?upgraded,?25?newly?installed,?0?to?remove?and?0?not?upgraded.
Need?to?get?5593?kB?of?archives.
After?this?operation,?19.8?MB?of?additional?disk?space?will?be?used.
Get:1?http://archive.ubuntu.com/ubuntu/?trusty/main?libgeoip1?amd64?1.6.0-1?[71.0?kB]
Get:2?http://archive.ubuntu.com/ubuntu/?trusty/main?libxau6?amd64?1:1.0.8-1?[8376?B]
Get:3?http://archive.ubuntu.com/ubuntu/?trusty/main?libxdmcp6?amd64?1:1.1.1-1?[12.8?kB]
Get:4?http://archive.ubuntu.com/ubuntu/?trusty/main?libxcb1?amd64?1.10-2ubuntu1?[38.0?kB]
Get:5?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libx11-data?all?2:1.6.2-1ubuntu2.1?[111?kB]
Get:6?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libx11-6?amd64?2:1.6.2-1ubuntu2.1?[561?kB]
Get:7?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libxml2?amd64?2.9.1+dfsg1-3ubuntu4.13?[573?kB]
Get:8?http://archive.ubuntu.com/ubuntu/?trusty/main?sgml-base?all?1.26+nmu4ubuntu1?[12.5?kB]
Get:9?http://archive.ubuntu.com/ubuntu/?trusty/main?fonts-dejavu-core?all?2.34-1ubuntu1?[1024?kB]
Get:10?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?fontconfig-config?all?2.11.0-0ubuntu4.2?[47.4?kB]
Get:11?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libfreetype6?amd64?2.5.2-1ubuntu2.8?[304?kB]
Get:12?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libfontconfig1?amd64?2.11.0-0ubuntu4.2?[123?kB]
Get:13?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libjpeg-turbo8?amd64?1.3.0-0ubuntu2.1?[104?kB]
Get:14?http://archive.ubuntu.com/ubuntu/?trusty/main?libjpeg8?amd64?8c-2ubuntu8?[2194?B]
Get:15?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libjbig0?amd64?2.0-2ubuntu4.1?[26.1?kB]
Get:16?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libtiff5?amd64?4.0.3-7ubuntu0.9?[147?kB]
Get:17?http://archive.ubuntu.com/ubuntu/?trusty/main?libvpx1?amd64?1.3.0-2?[556?kB]
Get:18?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libxpm4?amd64?1:3.5.10-1ubuntu0.1?[33.2?kB]
Get:19?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libgd3?amd64?2.1.0-3ubuntu0.10?[123?kB]
Get:20?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?libxslt1.1?amd64?1.1.28-2ubuntu0.1?[145?kB]
Get:21?http://archive.ubuntu.com/ubuntu/?trusty/main?geoip-database?all?20140313-1?[1196?kB]
Get:22?http://archive.ubuntu.com/ubuntu/?trusty/main?xml-core?all?0.13+nmu2?[23.3?kB]
Get:23?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?nginx-common?all?1.4.6-1ubuntu3.8?[19.1?kB]
Get:24?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?nginx-core?amd64?1.4.6-1ubuntu3.8?[325?kB]
Get:25?http://archive.ubuntu.com/ubuntu/?trusty-updates/main?nginx?all?1.4.6-1ubuntu3.8?[5394?B]
debconf:?unable?to?initialize?frontend:?Dialog
debconf:?(TERM?is?not?set,?so?the?dialog?frontend?is?not?usable.)
debconf:?falling?back?to?frontend:?Readline
debconf:?unable?to?initialize?frontend:?Readline
debconf:?(This?frontend?requires?a?controlling?tty.)
debconf:?falling?back?to?frontend:?Teletype
dpkg-preconfigure:?unable?to?re-open?stdin:?
Fetched?5593?kB?in?6min?9s?(15.2?kB/s)
Selecting?previously?unselected?package?libgeoip1:amd64.
(Reading?database?...?11571?files?and?directories?currently?installed.)
Preparing?to?unpack?.../libgeoip1_1.6.0-1_amd64.deb?...
Unpacking?libgeoip1:amd64?(1.6.0-1)?...
Selecting?previously?unselected?package?libxau6:amd64.
Preparing?to?unpack?.../libxau6_1%3a1.0.8-1_amd64.deb?...
Unpacking?libxau6:amd64?(1:1.0.8-1)?...
Selecting?previously?unselected?package?libxdmcp6:amd64.
Preparing?to?unpack?.../libxdmcp6_1%3a1.1.1-1_amd64.deb?...
Unpacking?libxdmcp6:amd64?(1:1.1.1-1)?...
Selecting?previously?unselected?package?libxcb1:amd64.
Preparing?to?unpack?.../libxcb1_1.10-2ubuntu1_amd64.deb?...
Unpacking?libxcb1:amd64?(1.10-2ubuntu1)?...
Selecting?previously?unselected?package?libx11-data.
Preparing?to?unpack?.../libx11-data_2%3a1.6.2-1ubuntu2.1_all.deb?...
Unpacking?libx11-data?(2:1.6.2-1ubuntu2.1)?...
Selecting?previously?unselected?package?libx11-6:amd64.
Preparing?to?unpack?.../libx11-6_2%3a1.6.2-1ubuntu2.1_amd64.deb?...
Unpacking?libx11-6:amd64?(2:1.6.2-1ubuntu2.1)?...
Selecting?previously?unselected?package?libxml2:amd64.
Preparing?to?unpack?.../libxml2_2.9.1+dfsg1-3ubuntu4.13_amd64.deb?...
Unpacking?libxml2:amd64?(2.9.1+dfsg1-3ubuntu4.13)?...
Selecting?previously?unselected?package?sgml-base.
Preparing?to?unpack?.../sgml-base_1.26+nmu4ubuntu1_all.deb?...
Unpacking?sgml-base?(1.26+nmu4ubuntu1)?...
Selecting?previously?unselected?package?fonts-dejavu-core.
Preparing?to?unpack?.../fonts-dejavu-core_2.34-1ubuntu1_all.deb?...
Unpacking?fonts-dejavu-core?(2.34-1ubuntu1)?...
Selecting?previously?unselected?package?fontconfig-config.
Preparing?to?unpack?.../fontconfig-config_2.11.0-0ubuntu4.2_all.deb?...
Unpacking?fontconfig-config?(2.11.0-0ubuntu4.2)?...
Selecting?previously?unselected?package?libfreetype6:amd64.
Preparing?to?unpack?.../libfreetype6_2.5.2-1ubuntu2.8_amd64.deb?...
Unpacking?libfreetype6:amd64?(2.5.2-1ubuntu2.8)?...
Selecting?previously?unselected?package?libfontconfig1:amd64.
Preparing?to?unpack?.../libfontconfig1_2.11.0-0ubuntu4.2_amd64.deb?...
Unpacking?libfontconfig1:amd64?(2.11.0
總結(jié)
以上是生活随笔為你收集整理的开箱即用的 SQL Server Docker的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
 
                            
                        - 上一篇: 吾爱破解工具箱 v 1.0
- 下一篇: 微信分享统计
