dockerfile+ubuntu+nginx搭建web环境
准备目录
[root@izchz ~]# mkdir /usr/local/dockerfile1
该目录下准备Dockerfile文件
FROM ubuntu
MAINTAINER xbf
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y nginx
COPY index.html /var/www/html
ENTRYPOINT ["/usr/sbin/nginx","g","daemon off;"]
EXPOSE
解释下各行的意思
第一行:说明依赖ubuntu
第二行:作者是xbf
第三行:加速
第四行:更新一下环境
第五行:安装nginx,-y就是表示不要总是询问
第六行:拷贝服务器当前目录里的index.html到nginx里
第七行:让nginx前台运行
第八行:端口
更多Dockerfile语法
同目录下准备index.html文件
内容就一句话
What day is it today?
构建镜像
[root@iz2zeh5mjwg5u2vl2fawchz dockerfile1]# docker build -t xbf/hello-nginx .
Sending build context to Docker daemon 3.072 kB
Step / : FROM ubuntu
Trying to pull repository docker.io/library/ubuntu ...
latest: Pulling from docker.io/library/ubuntu
6b98dfc16071: Pull complete
4001a1209541: Pull complete
6319fc68c576: Pull complete
b24603670dc3: Pull complete
97f170c87c6f: Pull complete
Digest: sha256:5f4bdc3467537cbbe563e80db2c3ec95d548a9145d64453b06939c4592d67b6d
Status: Downloaded newer image for docker.io/ubuntu:latest
---> 113a43faa138
Step / : MAINTAINER xbf
---> Running in 118668b4905a
---> 78bb87f20383
Removing intermediate container 118668b4905a
Step / : RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
---> Running in 9bbb6c182746 ---> 24ef42b63544
Removing intermediate container 9bbb6c182746
Step / : RUN apt-get update
---> Running in 2c8511a15eb7 Get: http://mirrors.ustc.edu.cn/ubuntu bionic InRelease [242 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease [83.2 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/universe Sources [11.5 MB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 Packages [1344 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get: http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe Sources [32.4 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-updates/universe amd64 Packages [106 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-updates/multiverse amd64 Packages [1663 B]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-updates/main amd64 Packages [178 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic-backports/universe amd64 Packages [2793 B]
Get: http://security.ubuntu.com/ubuntu bionic-security/universe Sources [5646 B]
Get: http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [38.5 kB]
Get: http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [123 kB]
Get: http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1075 B]
Fetched 25.4 MB in 8s ( kB/s)
Reading package lists...
---> b26a1de6e650
Removing intermediate container 2c8511a15eb7
Step / : RUN apt-get install -y nginx
---> Running in e88fccbe2bf6 Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libbsd0 libexpat1
libfontconfig1 libfreetype6 libgd3 libgeoip1 libicu60 libjbig0
libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip
libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter
libnginx-mod-mail libnginx-mod-stream libpng16- libssl1. libtiff5
libwebp6 libx11- libx11-data libxau6 libxcb1 libxdmcp6 libxml2 libxpm4
libxslt1. multiarch-support nginx-common nginx-core ucf
Suggested packages:
libgd-tools geoip-bin fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
fontconfig-config fonts-dejavu-core geoip-database libbsd0 libexpat1
libfontconfig1 libfreetype6 libgd3 libgeoip1 libicu60 libjbig0
libjpeg-turbo8 libjpeg8 libnginx-mod-http-geoip
libnginx-mod-http-image-filter libnginx-mod-http-xslt-filter
libnginx-mod-mail libnginx-mod-stream libpng16- libssl1. libtiff5
libwebp6 libx11- libx11-data libxau6 libxcb1 libxdmcp6 libxml2 libxpm4
libxslt1. multiarch-support nginx nginx-common nginx-core ucf
upgraded, newly installed, to remove and not upgraded.
Need to get 16.1 MB of archives.
After this operation, 58.8 MB of additional disk space will be used.
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 multiarch-support amd64 2.27-3ubuntu1 [6916 B]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxau6 amd64 1:1.0.8-1 [8376 B]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libjpeg-turbo8 amd64 1.5.2-0ubuntu5 [110 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libbsd0 amd64 0.8.7-1 [41.5 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libicu60 amd64 60.2-3ubuntu3 [8054 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libssl1.1 amd64 1.1.0g-2ubuntu4 [1128 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxml2 amd64 2.9.4+dfsg1-6.1ubuntu1 [662 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 ucf all 3.0038 [50.5 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 geoip-database all 20180315-1 [2090 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libgeoip1 amd64 1.6.12-1 [71.8 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libpng16-16 amd64 1.6.34-1 [176 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxdmcp6 amd64 1:1.1.2-3 [10.7 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxcb1 amd64 1.13-1 [45.6 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libx11-data all 2:1.6.4-3 [114 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libx11-6 amd64 2:1.6.4-3 [572 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 fonts-dejavu-core all 2.37-1 [1041 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 fontconfig-config all 2.12.6-0ubuntu2 [55.8 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libfreetype6 amd64 2.8.1-2ubuntu2 [335 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libfontconfig1 amd64 2.12.6-0ubuntu2 [137 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libjpeg8 amd64 8c-2ubuntu8 [2194 B]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libjbig0 amd64 2.1-3.1build1 [26.7 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libtiff5 amd64 4.0.9-5 [152 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libwebp6 amd64 0.6.1-2 [185 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxpm4 amd64 1:3.5.12-1 [34.0 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libgd3 amd64 2.2.5-4 [118 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 nginx-common all 1.14.0-0ubuntu1 [37.0 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnginx-mod-http-geoip amd64 1.14.0-0ubuntu1 [10.8 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnginx-mod-http-image-filter amd64 1.14.0-0ubuntu1 [14.2 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libxslt1.1 amd64 1.1.29-5 [150 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnginx-mod-http-xslt-filter amd64 1.14.0-0ubuntu1 [12.6 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnginx-mod-mail amd64 1.14.0-0ubuntu1 [41.4 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 libnginx-mod-stream amd64 1.14.0-0ubuntu1 [63.3 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 nginx-core amd64 1.14.0-0ubuntu1 [412 kB]
Get: http://mirrors.ustc.edu.cn/ubuntu bionic/main amd64 nginx all 1.14.0-0ubuntu1 [3596 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 16.1 MB in 2s ( kB/s)
Selecting previously unselected package multiarch-support.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../multiarch-support_2.-3ubuntu1_amd64.deb ...
Unpacking multiarch-support (2.27-3ubuntu1) ...
Setting up multiarch-support (2.27-3ubuntu1) ...
Selecting previously unselected package libxau6:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../-libxau6_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau6:amd64 (:1.0.-) ...
Selecting previously unselected package libjpeg-turbo8:amd64.
Preparing to unpack .../-libjpeg-turbo8_1.5.2-0ubuntu5_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.5.-0ubuntu5) ...
Selecting previously unselected package libbsd0:amd64.
Preparing to unpack .../-libbsd0_0.8.7-1_amd64.deb ...
Unpacking libbsd0:amd64 (0.8.-) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../-libexpat1_2.2.5-3_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.-) ...
Selecting previously unselected package libicu60:amd64.
Preparing to unpack .../-libicu60_60.-3ubuntu3_amd64.deb ...
Unpacking libicu60:amd64 (60.2-3ubuntu3) ...
Selecting previously unselected package libssl1.:amd64.
Preparing to unpack .../-libssl1.1_1..0g-2ubuntu4_amd64.deb ...
Unpacking libssl1.:amd64 (1.1.0g-2ubuntu4) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../-libxml2_2.9.4+dfsg1-.1ubuntu1_amd64.deb ...
Unpacking libxml2:amd64 (2.9.+dfsg1-.1ubuntu1) ...
Selecting previously unselected package ucf.
Preparing to unpack .../-ucf_3.0038_all.deb ...
Moving old data out of the way
Unpacking ucf (3.0038) ...
Selecting previously unselected package geoip-database.
Preparing to unpack .../-geoip-database_20180315-1_all.deb ...
Unpacking geoip-database (-) ...
Selecting previously unselected package libgeoip1:amd64.
Preparing to unpack .../-libgeoip1_1.6.12-1_amd64.deb ...
Unpacking libgeoip1:amd64 (1.6.-) ...
Selecting previously unselected package libpng16-:amd64.
Preparing to unpack .../-libpng16-16_1.6.34-1_amd64.deb ...
Unpacking libpng16-:amd64 (1.6.-) ...
Selecting previously unselected package libxdmcp6:amd64.
Preparing to unpack .../-libxdmcp6_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp6:amd64 (:1.1.-) ...
Selecting previously unselected package libxcb1:amd64.
Preparing to unpack .../-libxcb1_1.-1_amd64.deb ...
Unpacking libxcb1:amd64 (1.13-) ...
Selecting previously unselected package libx11-data.
Preparing to unpack .../-libx11-data_2%3a1.6.4-3_all.deb ...
Unpacking libx11-data (:1.6.-) ...
Selecting previously unselected package libx11-:amd64.
Preparing to unpack .../-libx11-6_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-:amd64 (:1.6.-) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../-fonts-dejavu-core_2.-1_all.deb ...
Unpacking fonts-dejavu-core (2.37-) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../-fontconfig-config_2.12.6-0ubuntu2_all.deb ...
Unpacking fontconfig-config (2.12.-0ubuntu2) ...
Selecting previously unselected package libfreetype6:amd64.
Preparing to unpack .../-libfreetype6_2.8.1-2ubuntu2_amd64.deb ...
Unpacking libfreetype6:amd64 (2.8.-2ubuntu2) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../-libfontconfig1_2.12.6-0ubuntu2_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.12.-0ubuntu2) ...
Selecting previously unselected package libjpeg8:amd64.
Preparing to unpack .../-libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../-libjbig0_2.-.1build1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-.1build1) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../-libtiff5_4.0.9-5_amd64.deb ...
Unpacking libtiff5:amd64 (4.0.-) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../-libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.-) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (:3.5.-) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../-libgd3_2.2.5-4_amd64.deb ...
Unpacking libgd3:amd64 (2.2.-) ...
Selecting previously unselected package nginx-common.
Preparing to unpack .../-nginx-common_1.14.0-0ubuntu1_all.deb ...
Unpacking nginx-common (1.14.-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-http-geoip.
Preparing to unpack .../-libnginx-mod-http-geoip_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-geoip (1.14.-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-http-image-filter.
Preparing to unpack .../-libnginx-mod-http-image-filter_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-image-filter (1.14.-0ubuntu1) ...
Selecting previously unselected package libxslt1.:amd64.
Preparing to unpack .../-libxslt1.1_1.1.29-5_amd64.deb ...
Unpacking libxslt1.:amd64 (1.1.-) ...
Selecting previously unselected package libnginx-mod-http-xslt-filter.
Preparing to unpack .../-libnginx-mod-http-xslt-filter_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-http-xslt-filter (1.14.-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-mail.
Preparing to unpack .../-libnginx-mod-mail_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-mail (1.14.-0ubuntu1) ...
Selecting previously unselected package libnginx-mod-stream.
Preparing to unpack .../-libnginx-mod-stream_1.14.0-0ubuntu1_amd64.deb ...
Unpacking libnginx-mod-stream (1.14.-0ubuntu1) ...
Selecting previously unselected package nginx-core.
Preparing to unpack .../-nginx-core_1.14.0-0ubuntu1_amd64.deb ...
Unpacking nginx-core (1.14.-0ubuntu1) ...
Selecting previously unselected package nginx.
Preparing to unpack .../-nginx_1.14.0-0ubuntu1_all.deb ...
Unpacking nginx (1.14.-0ubuntu1) ...
Setting up libexpat1:amd64 (2.2.-) ...
Setting up libicu60:amd64 (60.2-3ubuntu3) ...
Setting up geoip-database (-) ...
Setting up libpng16-:amd64 (1.6.-) ...
Setting up libjbig0:amd64 (2.1-.1build1) ...
Setting up fonts-dejavu-core (2.37-) ...
Setting up nginx-common (1.14.-0ubuntu1) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libjpeg-turbo8:amd64 (1.5.-0ubuntu5) ...
Setting up libgeoip1:amd64 (1.6.-) ...
Setting up libbsd0:amd64 (0.8.-) ...
Setting up ucf (3.0038) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libxml2:amd64 (2.9.+dfsg1-.1ubuntu1) ...
Setting up libfreetype6:amd64 (2.8.-2ubuntu2) ...
Setting up libxslt1.:amd64 (1.1.-) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libssl1.:amd64 (1.1.0g-2ubuntu4) ...
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: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up libnginx-mod-mail (1.14.-0ubuntu1) ...
Setting up libnginx-mod-http-xslt-filter (1.14.-0ubuntu1) ...
Setting up libxdmcp6:amd64 (:1.1.-) ...
Setting up libnginx-mod-http-geoip (1.14.-0ubuntu1) ...
Setting up libx11-data (:1.6.-) ...
Setting up libxau6:amd64 (:1.0.-) ...
Setting up libwebp6:amd64 (0.6.-) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up fontconfig-config (2.12.-0ubuntu2) ...
Setting up libnginx-mod-stream (1.14.-0ubuntu1) ...
Setting up libtiff5:amd64 (4.0.-) ...
Setting up libxcb1:amd64 (1.13-) ...
Setting up libfontconfig1:amd64 (2.12.-0ubuntu2) ...
Setting up libx11-:amd64 (:1.6.-) ...
Setting up libxpm4:amd64 (:3.5.-) ...
Setting up libgd3:amd64 (2.2.-) ...
Setting up libnginx-mod-http-image-filter (1.14.-0ubuntu1) ...
Setting up nginx-core (1.14.-0ubuntu1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up nginx (1.14.-0ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
---> 0d85124c0053
Removing intermediate container e88fccbe2bf6
Step / : COPY index.html /var/www/html
---> 47982e76c320
Removing intermediate container 372e2185a512
Step / : ENTRYPOINT /usr/sbin/nginx g daemon off;
---> Running in a973e7d68e60
---> a7802784dfb1
Removing intermediate container a973e7d68e60
Step / : EXPOSE
---> Running in b8455236eca0
---> 2230ac934a5f
Removing intermediate container b8455236eca0
Successfully built 2230ac934a5f
看到successfully就说明成功了
查看构建的镜像
[root@iz2zeh5mjwg5u2vl2fawchz dockerfile1]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
xbf/hello-nginx latest 2230ac934a5f minutes ago MB
hello_docker latest 65d690c9d782 minutes ago 4.15 MB
docker.io/ubuntu latest 113a43faa138 days ago 81.2 MB
docker.io/centos latest 49f7960eb7e4 days ago MB
docker.io/stephenreed/jenkins-java8-maven-git latest 3670d4afa617 months ago MB
docker.io/alpine latest 3fd9065eaf02 months ago 4.15 MB
docker.io/stephenreed/java8-jenkins-maven-git-nano latest 508ef553bf1a years ago 1.5 GB
运行构建好的镜像
[root@iz2zeh5mjwg5u2vl2fawchz dockerfile1]# docker run -d -p : xbf/hello-nginx
84d5d2b00de5544aa3810f9d1111f92dc4146c5bbafb6a02371a52b1a2b4575b
测试
[root@izwchz dockerfile1]# curl http://localhost:8080
输出What day is it today?
dockerfile+ubuntu+nginx搭建web环境的更多相关文章
- Ubuntu上搭建Hadoop环境(单机模式+伪分布模式) (转载)
Hadoop在处理海量数据分析方面具有独天优势.今天花了在自己的Linux上搭建了伪分布模式,期间经历很多曲折,现在将经验总结如下. 首先,了解Hadoop的三种安装模式: 1. 单机模式. 单机模式 ...
- MAMP和WAMP搭建Web环境,数据库,数据分布可视化
MAMP和WAMP搭建Web环境,数据库,数据分布可视化 1. 数据库 用MAMP和WAMP搭建Web环境,数据分布可视化 Web环境Web服务器:Apache.Nginx,处理Web请求数据库:My ...
- Haproxy配合Nginx搭建Web集群部署
Haproxy配合Nginx搭建Web集群部署实验 1.Haproxy介绍 2.Haproxy搭建 Web 群集 1.Haproxy介绍: a)常见的Web集群调度器: 目前常见的Web集群调度器分为 ...
- 在ubuntu上搭建开发环境3---解决Y470一键系统重装之后恢复ubuntu引导启动的方法
2015/08/18 将知识.常用的操作整理出来一定要完整,注意细节. 就像下面是再2015.04.27时候整理的,当时确实实验成功了,但是可能忘记记下具体的细节,尤其是3.4.5.6步骤中的关于盘符 ...
- 快速搭建Web环境 Angularjs + Express3 + Bootstrap3
快速搭建Web环境 Angularjs + Express3 + Bootstrap3 AngularJS体验式编程系列文章, 将介绍如何用angularjs构建一个强大的web前端系统.angula ...
- deepin/ubuntu下搭建Jekyll环境
title: deepin/ubuntu下搭建Jekyll环境 最近用github搭建了个博客,正好也学习一下markdown语法,由于markdown写完后不是立即可见,所以每次写完文章都要经过在线 ...
- Linux Ubuntu从零开始部署web环境及项目 -----部署项目 (三)
上一篇讲了如何在linux搭建web环境,这边将如何部署项目. 1,打包项目包 2,上传项目包 将.war项目包通过xftp上传到tomcat目录wabapps目录下 3,启动项目 通过xshell命 ...
- 93.快速搭建Web环境 Angularjs + Express3 + Bootstrap3
转自:https://www.cnblogs.com/wawahaha/p/3946023.html 前言 Angularjs越用越顺手,不仅代码量比jQuery少很多,而且实现思路特别清晰,构建大型 ...
- Linux Ubuntu从零开始部署web环境及项目-----搭建ssh环境(一)
linux搭建ssh环境 1,用户登录 成功输入用户名和密码后 进入Ubuntu界面 2,配置网络 参考:http://blog.csdn.net/liu782726344/article/deta ...
随机推荐
- windows7_64位安装sql_server_2000成功
对于4合一的版本来说只要找到安装包里的 STANDARD.PERSONAL.ENTERPRISE.DEVELOPER文件夹下的 X86\SETUP\SETUPSQL.EXE 任何一个运行即可,(理论上 ...
- 新疆大学ACM-ICPC程序设计竞赛五月月赛(同步赛)- Red Rover
链接:https://www.nowcoder.com/acm/contest/116/A来源:牛客网 输入描述: Input consists of a single line containing ...
- 【背包DP】【OpenJudge4978】宠物小精灵之收服
宠物小精灵之收服 总时间限制: 1000ms 内存限制: 65536kB [描述] 宠物小精灵是一部讲述小智和他的搭档皮卡丘一起冒险的故事. 一天,小智和皮卡丘来到了小精灵狩猎场,里面有很多珍贵的野生 ...
- Uprobes: userspace probes >= Linux 3.5
https://lwn.net/Articles/499190/ https://github.com/andreoli/fulltrace Prominent features in Linux 3 ...
- 在Android App中集成Google登录
技术文章 来源:码农网 发布:2016-09-19 浏览:194 摘要:今天,几乎所有的web和移动app都自带谷歌和Facebook登录,这对app开发者和用户来说是一个非常有用的功能,因为几乎每个 ...
- VUE -- 安装新模块
- bmp,jpg,png,tif,wmf,emf与eps图片格式转换
wmf/emf是两种Microsoft Windows的图形文件格式.它是一个矢量图格式,但是也允许包含位图.本质上,一个WMF文件保存一系列可以用来重建图片的Windows GDI命令.在某种程度上 ...
- scala测试框架:scalatest
api文档:http://tool.oschina.net/apidocs/apidoc?api=scalatest-1.7.2 trait Assertions:http://tool.oschin ...
- 41个linux命令大全(鸟哥的私房菜)
转http://www.xmws.cn/show-87-419-1.html 41个linux命令大全 发布作者:微思网络 发布时间:2017-01-10 浏览量:709次 学过linux的人 ...
- LINQ获取两个List的交集
1.调用: UserList = UserList.ToList().Intersect(userIDList, new MyUserComparer()).AsQueryable(); 2.须要重写 ...