Dockerfile 文件内容
# Base image
FROM centos
#MAINTAINER
MAINTAINER dengxl
#ADD
ADD pcre-8.38.tar.gz /usr/local/src
ADD nginx-1.9.3.tar.gz /usr/local/src
#RUN
RUN yum install -y wget gcc gcc-c++ make openssl-devel
RUN useradd -s /sbin/nologin -M www
#WORKDIR
WORKDIR /usr/local/src/nginx-1.9.3
#RUN
RUN ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with_http_stub_status_module --with-pcre=/usr/local/src/pcre-3.38 && make && make install
RUN echo "daemon off;" >> /usr/local/nginx/conf/nginx.conf
ENV PATH /usr/local/nginx/sbin:$PATH
EXPOSE 80
CMD ["nginx"]
执行 docker build -t nginx-file:v1 /opt/docker-file/nginx/ 命令,运行结果:
Sending build context to Docker daemon 2.922 MB
Sending build context to Docker daemon
Step 0 : FROM centos
---> 97cad5e16cb6
Step 1 : MAINTAINER dengxl
---> Using cache
---> 7899e00df5da
Step 2 : ADD pcre-8.38.tar.gz /usr/local/src
---> Using cache
---> a9bc08f165b2
Step 3 : ADD nginx-1.9.3.tar.gz /usr/local/src
---> Using cache
---> b47879abf64b
Step 4 : RUN yum install -y wget gcc gcc-c++ make openssl-devel
---> Running in 2162d30fc147
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
* base: mirrors.zju.edu.cn
* extras: mirrors.zju.edu.cn
* updates: mirrors.zju.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libgomp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libgcc >= 4.8.5-11.el7 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-11.el7.x86_64
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.8.5-11.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-11.el7 will be installed
--> Processing Dependency: libstdc++-devel = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
--> Processing Dependency: libstdc++ = 4.8.5-11.el7 for package: gcc-c++-4.8.5-11.el7.x86_64
---> Package make.x86_64 1:3.82-23.el7 will be installed
---> Package openssl-devel.x86_64 1:1.0.1e-60.el7 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-60.el7 for package: 1:openssl-devel-1.0.1e-60.el7.x86_64
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.1e-60.el7.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-60.el7.x86_64
---> Package wget.x86_64 0:1.14-13.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-11.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-157.el7_3.1 will be installed
--> Processing Dependency: glibc-headers = 2.17-157.el7_3.1 for package: glibc-devel-2.17-157.el7_3.1.x86_64
--> Processing Dependency: glibc = 2.17-157.el7_3.1 for package: glibc-devel-2.17-157.el7_3.1.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-157.el7_3.1.x86_64
---> Package krb5-devel.x86_64 0:1.14.1-27.el7_3 will be installed
--> Processing Dependency: libkadm5(x86-64) = 1.14.1-27.el7_3 for package: krb5-devel-1.14.1-27.el7_3.x86_64
--> Processing Dependency: krb5-libs(x86-64) = 1.14.1-27.el7_3 for package: krb5-devel-1.14.1-27.el7_3.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.14.1-27.el7_3.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.14.1-27.el7_3.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.14.1-27.el7_3.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.14.1-27.el7_3.x86_64
---> Package libgcc.x86_64 0:4.8.5-4.el7 will be updated
---> Package libgcc.x86_64 0:4.8.5-11.el7 will be an update
---> Package libgomp.x86_64 0:4.8.5-11.el7 will be installed
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package libstdc++.x86_64 0:4.8.5-4.el7 will be updated
---> Package libstdc++.x86_64 0:4.8.5-11.el7 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-11.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.7 will be updated
---> Package openssl-libs.x86_64 1:1.0.1e-60.el7 will be an update
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Processing Dependency: zlib = 1.2.7-17.el7 for package: zlib-devel-1.2.7-17.el7.x86_64
--> Running transaction check
---> Package glibc.x86_64 0:2.17-106.el7_2.8 will be updated
--> Processing Dependency: glibc = 2.17-106.el7_2.8 for package: glibc-common-2.17-106.el7_2.8.x86_64
---> Package glibc.x86_64 0:2.17-157.el7_3.1 will be an update
---> Package glibc-headers.x86_64 0:2.17-157.el7_3.1 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-157.el7_3.1.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-157.el7_3.1.x86_64
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.13.2-12.el7_2 will be updated
---> Package krb5-libs.x86_64 0:1.14.1-27.el7_3 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-9.el7 will be installed
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-9.el7 for package: libcom_err-devel-1.42.9-9.el7.x86_64
---> Package libkadm5.x86_64 0:1.14.1-27.el7_3 will be installed
---> Package libselinux-devel.x86_64 0:2.5-6.el7 will be installed
--> Processing Dependency: libselinux(x86-64) = 2.5-6.el7 for package: libselinux-devel-2.5-6.el7.x86_64
--> Processing Dependency: libsepol-devel(x86-64) >= 2.5-6 for package: libselinux-devel-2.5-6.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.5-6.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.5-6.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package zlib.x86_64 0:1.2.7-15.el7 will be updated
---> Package zlib.x86_64 0:1.2.7-17.el7 will be an update
--> Running transaction check
---> Package glibc-common.x86_64 0:2.17-106.el7_2.8 will be updated
---> Package glibc-common.x86_64 0:2.17-157.el7_3.1 will be an update
---> Package kernel-headers.x86_64 0:3.10.0-514.2.2.el7 will be installed
---> Package libcom_err.x86_64 0:1.42.9-7.el7 will be updated
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-7.el7 for package: libss-1.42.9-7.el7.x86_64
---> Package libcom_err.x86_64 0:1.42.9-9.el7 will be an update
---> Package libselinux.x86_64 0:2.2.2-6.el7 will be updated
---> Package libselinux.x86_64 0:2.5-6.el7 will be an update
--> Processing Dependency: libsepol(x86-64) >= 2.5-6 for package: libselinux-2.5-6.el7.x86_64
--> Processing Dependency: libsepol.so.1(LIBSEPOL_1.0)(64bit) for package: libselinux-2.5-6.el7.x86_64
---> Package libsepol-devel.x86_64 0:2.5-6.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-15.el7_2.1 will be installed
--> Running transaction check
---> Package libsepol.x86_64 0:2.1.9-3.el7 will be updated
---> Package libsepol.x86_64 0:2.5-6.el7 will be an update
---> Package libss.x86_64 0:1.42.9-7.el7 will be updated
---> Package libss.x86_64 0:1.42.9-9.el7 will be an update
--> Processing Conflict: libselinux-2.5-6.el7.x86_64 conflicts systemd < 219-20
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package systemd.x86_64 0:219-19.el7_2.13 will be updated
---> Package systemd.x86_64 0:219-30.el7_3.6 will be an update
--> Processing Dependency: systemd-libs = 219-30.el7_3.6 for package: systemd-219-30.el7_3.6.x86_64
--> Running transaction check
---> Package systemd-libs.x86_64 0:219-19.el7_2.13 will be updated
---> Package systemd-libs.x86_64 0:219-30.el7_3.6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
gcc x86_64 4.8.5-11.el7 base 16 M
gcc-c++ x86_64 4.8.5-11.el7 base 7.2 M
make x86_64 1:3.82-23.el7 base 420 k
openssl-devel x86_64 1:1.0.1e-60.el7 base 1.2 M
wget x86_64 1.14-13.el7 base 546 k
Updating:
systemd x86_64 219-30.el7_3.6 updates 5.2 M
Installing for dependencies:
cpp x86_64 4.8.5-11.el7 base 5.9 M
glibc-devel x86_64 2.17-157.el7_3.1 updates 1.1 M
glibc-headers x86_64 2.17-157.el7_3.1 updates 668 k
kernel-headers x86_64 3.10.0-514.2.2.el7 updates 4.8 M
keyutils-libs-devel x86_64 1.5.8-3.el7 base 37 k
krb5-devel x86_64 1.14.1-27.el7_3 updates 651 k
libcom_err-devel x86_64 1.42.9-9.el7 base 31 k
libgomp x86_64 4.8.5-11.el7 base 152 k
libkadm5 x86_64 1.14.1-27.el7_3 updates 173 k
libmpc x86_64 1.0.1-3.el7 base 51 k
libselinux-devel x86_64 2.5-6.el7 base 186 k
libsepol-devel x86_64 2.5-6.el7 base 74 k
libstdc++-devel x86_64 4.8.5-11.el7 base 1.5 M
libverto-devel x86_64 0.2.5-4.el7 base 12 k
mpfr x86_64 3.1.1-4.el7 base 203 k
pcre-devel x86_64 8.32-15.el7_2.1 base 479 k
zlib-devel x86_64 1.2.7-17.el7 base 50 k
Updating for dependencies:
glibc x86_64 2.17-157.el7_3.1 updates 3.6 M
glibc-common x86_64 2.17-157.el7_3.1 updates 11 M
krb5-libs x86_64 1.14.1-27.el7_3 updates 740 k
libcom_err x86_64 1.42.9-9.el7 base 40 k
libgcc x86_64 4.8.5-11.el7 base 97 k
libselinux x86_64 2.5-6.el7 base 161 k
libsepol x86_64 2.5-6.el7 base 288 k
libss x86_64 1.42.9-9.el7 base 45 k
libstdc++ x86_64 4.8.5-11.el7 base 300 k
openssl-libs x86_64 1:1.0.1e-60.el7 base 958 k
systemd-libs x86_64 219-30.el7_3.6 updates 368 k
zlib x86_64 1.2.7-17.el7 base 90 k
Transaction Summary
================================================================================
Install 5 Packages (+17 Dependent packages)
Upgrade 1 Package (+12 Dependent packages)
Total download size: 65 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/updates/packages/glibc-2.17-157.el7_3.1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for glibc-2.17-157.el7_3.1.x86_64.rpm is not installed
Public key for gcc-c++-4.8.5-11.el7.x86_64.rpm is not installed
Delta RPMs disabled because /usr/bin/applydeltarpm not installed--------------------------------------------------------------------------------
Total 625 kB/s | 65 MB 01:46
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-2.1511.el7.centos.2.10.x86_64 (@CentOS)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libgcc-4.8.5-11.el7.x86_64 1/48
Updating : glibc-common-2.17-157.el7_3.1.x86_64 2/48
Updating : glibc-2.17-157.el7_3.1.x86_64 3/48
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
Updating : libsepol-2.5-6.el7.x86_64 4/48
Updating : libselinux-2.5-6.el7.x86_64 5/48
Updating : zlib-1.2.7-17.el7.x86_64 6/48
Updating : libcom_err-1.42.9-9.el7.x86_64 7/48
Installing : mpfr-3.1.1-4.el7.x86_64 8/48
Installing : libmpc-1.0.1-3.el7.x86_64 9/48
Updating : 1:openssl-libs-1.0.1e-60.el7.x86_64 10/48
Updating : krb5-libs-1.14.1-27.el7_3.x86_64 11/48
Updating : libstdc++-4.8.5-11.el7.x86_64 12/48
Installing : libstdc++-devel-4.8.5-11.el7.x86_64 13/48
Installing : libkadm5-1.14.1-27.el7_3.x86_64 14/48
Installing : cpp-4.8.5-11.el7.x86_64 15/48
Installing : libcom_err-devel-1.42.9-9.el7.x86_64 16/48
Installing : zlib-devel-1.2.7-17.el7.x86_64 17/48
Updating : systemd-libs-219-30.el7_3.6.x86_64 18/48
Installing : libsepol-devel-2.5-6.el7.x86_64 19/48
Installing : libgomp-4.8.5-11.el7.x86_64 20/48
Installing : kernel-headers-3.10.0-514.2.2.el7.x86_64 21/48
Installing : glibc-headers-2.17-157.el7_3.1.x86_64 22/48
Installing : glibc-devel-2.17-157.el7_3.1.x86_64 23/48
Installing : gcc-4.8.5-11.el7.x86_64 24/48
Installing : libverto-devel-0.2.5-4.el7.x86_64 25/48
Installing : pcre-devel-8.32-15.el7_2.1.x86_64 26/48
Installing : libselinux-devel-2.5-6.el7.x86_64 27/48
Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64 28/48
Installing : krb5-devel-1.14.1-27.el7_3.x86_64 29/48
Installing : 1:openssl-devel-1.0.1e-60.el7.x86_64 30/48
Installing : gcc-c++-4.8.5-11.el7.x86_64 31/48
Updating : systemd-219-30.el7_3.6.x86_64 32/48
/var/tmp/rpm-tmp.U98zH3: line 1: /etc/sysconfig/network-scripts/network-functions: No such file or directory
warning: %triggerin(systemd-219-30.el7_3.6.x86_64) scriptlet failed, exit status 1
Non-fatal <unknown> scriptlet failure in rpm package systemd-219-30.el7_3.6.x86_64
Installing : wget-1.14-13.el7.x86_64 33/48
install-info: No such file or directory for /usr/share/info/wget.info.gz
Updating : libss-1.42.9-9.el7.x86_64 34/48
Installing : 1:make-3.82-23.el7.x86_64 35/48
Cleanup : systemd-219-19.el7_2.13.x86_64 36/48
Cleanup : krb5-libs-1.13.2-12.el7_2.x86_64 37/48
Cleanup : 1:openssl-libs-1.0.1e-51.el7_2.7.x86_64 38/48
Cleanup : systemd-libs-219-19.el7_2.13.x86_64 39/48
Cleanup : libstdc++-4.8.5-4.el7.x86_64 40/48
Cleanup : libss-1.42.9-7.el7.x86_64 41/48
Cleanup : libcom_err-1.42.9-7.el7.x86_64 42/48
Cleanup : zlib-1.2.7-15.el7.x86_64 43/48
Cleanup : libselinux-2.2.2-6.el7.x86_64 44/48
Cleanup : libsepol-2.1.9-3.el7.x86_64 45/48
Cleanup : glibc-common-2.17-106.el7_2.8.x86_64 46/48
Cleanup : glibc-2.17-106.el7_2.8.x86_64 47/48
Cleanup : libgcc-4.8.5-4.el7.x86_64 48/48
Verifying : zlib-devel-1.2.7-17.el7.x86_64 1/48
Verifying : keyutils-libs-devel-1.5.8-3.el7.x86_64 2/48
Verifying : libkadm5-1.14.1-27.el7_3.x86_64 3/48
Verifying : gcc-c++-4.8.5-11.el7.x86_64 4/48
Verifying : libsepol-2.5-6.el7.x86_64 5/48
Verifying : libselinux-2.5-6.el7.x86_64 6/48
Verifying : libsepol-devel-2.5-6.el7.x86_64 7/48
Verifying : pcre-devel-8.32-15.el7_2.1.x86_64 8/48
Verifying : cpp-4.8.5-11.el7.x86_64 9/48
Verifying : libselinux-devel-2.5-6.el7.x86_64 10/48
Verifying : systemd-libs-219-30.el7_3.6.x86_64 11/48
Verifying : 1:openssl-libs-1.0.1e-60.el7.x86_64 12/48
Verifying : glibc-headers-2.17-157.el7_3.1.x86_64 13/48
Verifying : glibc-common-2.17-157.el7_3.1.x86_64 14/48
Verifying : libverto-devel-0.2.5-4.el7.x86_64 15/48
Verifying : krb5-libs-1.14.1-27.el7_3.x86_64 16/48
Verifying : wget-1.14-13.el7.x86_64 17/48
Verifying : zlib-1.2.7-17.el7.x86_64 18/48
Verifying : 1:openssl-devel-1.0.1e-60.el7.x86_64 19/48
Verifying : systemd-219-30.el7_3.6.x86_64 20/48
Verifying : glibc-devel-2.17-157.el7_3.1.x86_64 21/48
Verifying : glibc-2.17-157.el7_3.1.x86_64 22/48
Verifying : libcom_err-devel-1.42.9-9.el7.x86_64 23/48
Verifying : kernel-headers-3.10.0-514.2.2.el7.x86_64 24/48
Verifying : libgcc-4.8.5-11.el7.x86_64 25/48
Verifying : 1:make-3.82-23.el7.x86_64 26/48
Verifying : libmpc-1.0.1-3.el7.x86_64 27/48
Verifying : libss-1.42.9-9.el7.x86_64 28/48
Verifying : libcom_err-1.42.9-9.el7.x86_64 29/48
Verifying : libstdc++-4.8.5-11.el7.x86_64 30/48
Verifying : krb5-devel-1.14.1-27.el7_3.x86_64 31/48
Verifying : mpfr-3.1.1-4.el7.x86_64 32/48
Verifying : libgomp-4.8.5-11.el7.x86_64 33/48
Verifying : gcc-4.8.5-11.el7.x86_64 34/48
Verifying : libstdc++-devel-4.8.5-11.el7.x86_64 35/48
Verifying : glibc-common-2.17-106.el7_2.8.x86_64 36/48
Verifying : 1:openssl-libs-1.0.1e-51.el7_2.7.x86_64 37/48
Verifying : libstdc++-4.8.5-4.el7.x86_64 38/48
Verifying : systemd-219-19.el7_2.13.x86_64 39/48
Verifying : systemd-libs-219-19.el7_2.13.x86_64 40/48
Verifying : zlib-1.2.7-15.el7.x86_64 41/48
Verifying : libsepol-2.1.9-3.el7.x86_64 42/48
Verifying : libcom_err-1.42.9-7.el7.x86_64 43/48
Verifying : glibc-2.17-106.el7_2.8.x86_64 44/48
Verifying : libss-1.42.9-7.el7.x86_64 45/48
Verifying : libgcc-4.8.5-4.el7.x86_64 46/48
Verifying : krb5-libs-1.13.2-12.el7_2.x86_64 47/48
Verifying : libselinux-2.2.2-6.el7.x86_64 48/48
Installed:
gcc.x86_64 0:4.8.5-11.el7 gcc-c++.x86_64 0:4.8.5-11.el7
make.x86_64 1:3.82-23.el7 openssl-devel.x86_64 1:1.0.1e-60.el7
wget.x86_64 0:1.14-13.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-11.el7
glibc-devel.x86_64 0:2.17-157.el7_3.1
glibc-headers.x86_64 0:2.17-157.el7_3.1
kernel-headers.x86_64 0:3.10.0-514.2.2.el7
keyutils-libs-devel.x86_64 0:1.5.8-3.el7
krb5-devel.x86_64 0:1.14.1-27.el7_3
libcom_err-devel.x86_64 0:1.42.9-9.el7
libgomp.x86_64 0:4.8.5-11.el7
libkadm5.x86_64 0:1.14.1-27.el7_3
libmpc.x86_64 0:1.0.1-3.el7
libselinux-devel.x86_64 0:2.5-6.el7
libsepol-devel.x86_64 0:2.5-6.el7
libstdc++-devel.x86_64 0:4.8.5-11.el7
libverto-devel.x86_64 0:0.2.5-4.el7
mpfr.x86_64 0:3.1.1-4.el7
pcre-devel.x86_64 0:8.32-15.el7_2.1
zlib-devel.x86_64 0:1.2.7-17.el7
Updated:
systemd.x86_64 0:219-30.el7_3.6
Dependency Updated:
glibc.x86_64 0:2.17-157.el7_3.1 glibc-common.x86_64 0:2.17-157.el7_3.1
krb5-libs.x86_64 0:1.14.1-27.el7_3 libcom_err.x86_64 0:1.42.9-9.el7
libgcc.x86_64 0:4.8.5-11.el7 libselinux.x86_64 0:2.5-6.el7
libsepol.x86_64 0:2.5-6.el7 libss.x86_64 0:1.42.9-9.el7
libstdc++.x86_64 0:4.8.5-11.el7 openssl-libs.x86_64 1:1.0.1e-60.el7
systemd-libs.x86_64 0:219-30.el7_3.6 zlib.x86_64 0:1.2.7-17.el7
Complete!
The command '/bin/sh -c yum install -y wget gcc gcc-c++ make openssl-devel' returned a non-zero code: 137
请问各位前辈这是什么问题啊,在线等...........