使用 Dockerfile 构建 jdk8 - tomcat8 镜像

发布时间: 更新时间: 总字数:1915 阅读时间:4m 作者: 分享

Java+Tomcat是进程常使用的Java Web服务器,该博文主要如何使用Dockerfile构建Docker镜像

Dockerfile

# Create by Xie Xianbin, For centos7 jdk image 
# v 1.0.0

# base image 
FROM xiexianbin/centos7:latest

# remark 
MAINTAINER Xie Xianbin "xianbinxie@163.com"

# Dockerfile build cache 
ENV REFRESHED_AT 2016-07-29

RUN rm -rf /etc/yum.repos.d/*
COPY Centos-7.repo /etc/yum.repos.d/
RUN yum clean all
RUN yum -y install wget curl vim tar
COPY apache-tomcat-8.5.4.tar.gz /opt/
COPY jdk-8u101-linux-x64.rpm /opt/

RUN rpm -ivh /opt/jdk-8u101-linux-x64.rpm
RUN tar -zxf /opt/apache-tomcat-8.5.4.tar.gz -C /opt/

RUN rm -rf /opt/jdk-7u79-linux-x64.rpm
RUN echo "sh /opt/apache-tomcat-8.5.4/bin/startup.sh" >> /etc/rc.local
RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/docs
RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/examples
RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/host-manager
RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/manager

RUN yum clean all
RUN history -c

EXPOSE 8080
ENTRYPOINT ["/bin/bash"]

Dockerfile 目录文件详情

Docker相关文件下载地址:[链接: http://pan.baidu.com/s/1i5M22pv][dockerfile]

[dockerfile]:链接: http://pan.baidu.com/s/1i5M22pv 密码: 2puc

Docker build 命令

docker build -t xiexianbin/centos7:j8t8 .

docker build 过程

[root@xiexianbin_cn docker]# docker build -t xiexianbin/centos7:j8t8 .
Sending build context to Docker daemon 175.2 MB
Sending build context to Docker daemon 
Step 0 : FROM xiexianbin/centos7:latest
 ---> 8c2683e1bd97
Step 1 : MAINTAINER Xie Xianbin "xianbinxie@163.com"
 ---> Running in 9edb67344021
 ---> 87315882baef
Removing intermediate container 9edb67344021
Step 2 : ENV REFRESHED_AT 2016-07-29
 ---> Running in 2859d0d296c9
 ---> 1d9d1abee74a
Removing intermediate container 2859d0d296c9
Step 3 : RUN rm -rf /etc/yum.repos.d/*
 ---> Running in c8e9de8a5aa7
 ---> 0b6a4f124e79
Removing intermediate container c8e9de8a5aa7
Step 4 : COPY Centos-7.repo /etc/yum.repos.d/
 ---> 7686937e7476
Removing intermediate container 662b434a0f72
Step 5 : RUN yum clean all
 ---> Running in d8c7feb1d8a5
Loaded plugins: fastestmirror, ovl
Cleaning repos: base extras updates
Cleaning up everything
 ---> 07c88afb5da7
Removing intermediate container d8c7feb1d8a5
Step 6 : RUN yum -y install wget curl vim tar
 ---> Running in 67c59c1a102b
Loaded plugins: fastestmirror, ovl
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/c6411f1cc8a000ed2b651b49134631d279abba1ec1f78e5dcca79a52d8c1eada-primary.sqlite.bz2: [Errno 12] Timeout on http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/c6411f1cc8a000ed2b651b49134631d279abba1ec1f78e5dcca79a52d8c1eada-primary.sqlite.bz2: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
Determining fastest mirrors
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Package curl-7.29.0-25.el7.centos.x86_64 already installed and latest version
Package 2:tar-1.26-29.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.160-1.el7 will be installed
--> Processing Dependency: vim-common = 2:7.4.160-1.el7 for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
--> Processing Dependency: which for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.160-1.el7.x86_64
---> Package wget.x86_64 0:1.14-10.el7_0.1 will be installed
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
---> Package perl.x86_64 4:5.16.3-286.el7 will be installed
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Exporter) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-286.el7.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-286.el7.x86_64
---> Package perl-libs.x86_64 4:5.16.3-286.el7 will be installed
---> Package vim-common.x86_64 2:7.4.160-1.el7 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-1.el7.x86_64
---> Package which.x86_64 0:2.20-7.el7 will be installed
--> Running transaction check
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-2.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-2.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-2.el7.noarch
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-3.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-macros.x86_64 4:5.16.3-286.el7 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
---> Package vim-filesystem.x86_64 2:7.4.160-1.el7 will be installed
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-286.el7 will be installed
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
--> Running transaction check
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: groff-base for package: perl-Pod-Perldoc-3.20-4.el7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package groff-base.x86_64 0:1.22.2-8.el7 will be installed
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch        Version                Repository
                                                                           Size
================================================================================
Installing:
 vim-enhanced                x86_64      2:7.4.160-1.el7        base      1.0 M
 wget                        x86_64      1.14-10.el7_0.1        base      545 k
Installing for dependencies:
 gpm-libs                    x86_64      1.20.7-5.el7           base       32 k
 groff-base                  x86_64      1.22.2-8.el7           base      942 k
 perl                        x86_64      4:5.16.3-286.el7       base      8.0 M
 perl-Carp                   noarch      1.26-244.el7           base       19 k
 perl-Encode                 x86_64      2.51-7.el7             base      1.5 M
 perl-Exporter               noarch      5.68-3.el7             base       28 k
 perl-File-Path              noarch      2.09-2.el7             base       26 k
 perl-File-Temp              noarch      0.23.01-3.el7          base       56 k
 perl-Filter                 x86_64      1.49-3.el7             base       76 k
 perl-Getopt-Long            noarch      2.40-2.el7             base       56 k
 perl-HTTP-Tiny              noarch      0.033-3.el7            base       38 k
 perl-PathTools              x86_64      3.40-5.el7             base       82 k
 perl-Pod-Escapes            noarch      1:1.04-286.el7         base       50 k
 perl-Pod-Perldoc            noarch      3.20-4.el7             base       87 k
 perl-Pod-Simple             noarch      1:3.28-4.el7           base      216 k
 perl-Pod-Usage              noarch      1.63-3.el7             base       27 k
 perl-Scalar-List-Utils      x86_64      1.27-248.el7           base       36 k
 perl-Socket                 x86_64      2.010-3.el7            base       49 k
 perl-Storable               x86_64      2.45-3.el7             base       77 k
 perl-Text-ParseWords        noarch      3.29-4.el7             base       14 k
 perl-Time-HiRes             x86_64      4:1.9725-3.el7         base       45 k
 perl-Time-Local             noarch      1.2300-2.el7           base       24 k
 perl-constant               noarch      1.27-2.el7             base       19 k
 perl-libs                   x86_64      4:5.16.3-286.el7       base      687 k
 perl-macros                 x86_64      4:5.16.3-286.el7       base       43 k
 perl-parent                 noarch      1:0.225-244.el7        base       12 k
 perl-podlators              noarch      2.5.1-3.el7            base      112 k
 perl-threads                x86_64      1.87-4.el7             base       49 k
 perl-threads-shared         x86_64      1.43-6.el7             base       39 k
 vim-common                  x86_64      2:7.4.160-1.el7        base      5.9 M
 vim-filesystem              x86_64      2:7.4.160-1.el7        base      9.6 k
 which                       x86_64      2.20-7.el7             base       41 k

Transaction Summary
================================================================================
Install  2 Packages (+32 Dependent packages)

Total download size: 20 M
Installed size: 65 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/gpm-libs-1.20.7-5.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for gpm-libs-1.20.7-5.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              2.1 MB/s |  20 MB  00:09     
Retrieving key from http://mirrors.aliyun.com/centos/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
 From       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:vim-filesystem-7.4.160-1.el7.x86_64                       1/34 
  Installing : 2:vim-common-7.4.160-1.el7.x86_64                           2/34 
  Installing : gpm-libs-1.20.7-5.el7.x86_64                                3/34 
  Installing : groff-base-1.22.2-8.el7.x86_64                              4/34 
  Installing : 1:perl-parent-0.225-244.el7.noarch                          5/34 
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                           6/34 
  Installing : perl-podlators-2.5.1-3.el7.noarch                           7/34 
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                          8/34 
  Installing : 1:perl-Pod-Escapes-1.04-286.el7.noarch                      9/34 
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                     10/34 
  Installing : perl-Encode-2.51-7.el7.x86_64                              11/34 
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                           12/34 
  Installing : 4:perl-libs-5.16.3-286.el7.x86_64                          13/34 
  Installing : 4:perl-macros-5.16.3-286.el7.x86_64                        14/34 
  Installing : perl-Storable-2.45-3.el7.x86_64                            15/34 
  Installing : perl-Exporter-5.68-3.el7.noarch                            16/34 
  Installing : perl-constant-1.27-2.el7.noarch                            17/34 
  Installing : perl-Time-Local-1.2300-2.el7.noarch                        18/34 
  Installing : perl-Socket-2.010-3.el7.x86_64                             19/34 
  Installing : perl-Carp-1.26-244.el7.noarch                              20/34 
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      21/34 
  Installing : perl-PathTools-3.40-5.el7.x86_64                           22/34 
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 23/34 
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                        24/34 
  Installing : perl-File-Path-2.09-2.el7.noarch                           25/34 
  Installing : perl-threads-shared-1.43-6.el7.x86_64                      26/34 
  Installing : perl-threads-1.87-4.el7.x86_64                             27/34 
  Installing : perl-Filter-1.49-3.el7.x86_64                              28/34 
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                        29/34 
  Installing : perl-Getopt-Long-2.40-2.el7.noarch                         30/34 
  Installing : 4:perl-5.16.3-286.el7.x86_64                               31/34 
  Installing : which-2.20-7.el7.x86_64                                    32/34 
install-info: No such file or directory for /usr/share/info/which.info.gz
  Installing : 2:vim-enhanced-7.4.160-1.el7.x86_64                        33/34 
  Installing : wget-1.14-10.el7_0.1.x86_64                                34/34 
install-info: No such file or directory for /usr/share/info/wget.info.gz
  Verifying  : 2:vim-common-7.4.160-1.el7.x86_64                           1/34 
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                           2/34 
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                       3/34 
  Verifying  : perl-Storable-2.45-3.el7.x86_64                             4/34 
  Verifying  : perl-Exporter-5.68-3.el7.noarch                             5/34 
  Verifying  : perl-constant-1.27-2.el7.noarch                             6/34 
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                            7/34 
  Verifying  : 4:perl-libs-5.16.3-286.el7.x86_64                           8/34 
  Verifying  : 4:perl-macros-5.16.3-286.el7.x86_64                         9/34 
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                         10/34 
  Verifying  : 4:perl-5.16.3-286.el7.x86_64                               11/34 
  Verifying  : which-2.20-7.el7.x86_64                                    12/34 
  Verifying  : groff-base-1.22.2-8.el7.x86_64                             13/34 
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                        14/34 
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                        15/34 
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                        16/34 
  Verifying  : gpm-libs-1.20.7-5.el7.x86_64                               17/34 
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                         18/34 
  Verifying  : perl-Socket-2.010-3.el7.x86_64                             19/34 
  Verifying  : 2:vim-filesystem-7.4.160-1.el7.x86_64                      20/34 
  Verifying  : perl-Carp-1.26-244.el7.noarch                              21/34 
  Verifying  : 2:vim-enhanced-7.4.160-1.el7.x86_64                        22/34 
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      23/34 
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 24/34 
  Verifying  : wget-1.14-10.el7_0.1.x86_64                                25/34 
  Verifying  : 1:perl-Pod-Escapes-1.04-286.el7.noarch                     26/34 
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                           27/34 
  Verifying  : perl-Encode-2.51-7.el7.x86_64                              28/34 
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                          29/34 
  Verifying  : perl-Getopt-Long-2.40-2.el7.noarch                         30/34 
  Verifying  : perl-File-Path-2.09-2.el7.noarch                           31/34 
  Verifying  : perl-threads-1.87-4.el7.x86_64                             32/34 
  Verifying  : perl-Filter-1.49-3.el7.x86_64                              33/34 
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                     34/34 

Installed:
  vim-enhanced.x86_64 2:7.4.160-1.el7       wget.x86_64 0:1.14-10.el7_0.1      

Dependency Installed:
  gpm-libs.x86_64 0:1.20.7-5.el7                                                
  groff-base.x86_64 0:1.22.2-8.el7                                              
  perl.x86_64 4:5.16.3-286.el7                                                  
  perl-Carp.noarch 0:1.26-244.el7                                               
  perl-Encode.x86_64 0:2.51-7.el7                                               
  perl-Exporter.noarch 0:5.68-3.el7                                             
  perl-File-Path.noarch 0:2.09-2.el7                                            
  perl-File-Temp.noarch 0:0.23.01-3.el7                                         
  perl-Filter.x86_64 0:1.49-3.el7                                               
  perl-Getopt-Long.noarch 0:2.40-2.el7                                          
  perl-HTTP-Tiny.noarch 0:0.033-3.el7                                           
  perl-PathTools.x86_64 0:3.40-5.el7                                            
  perl-Pod-Escapes.noarch 1:1.04-286.el7                                        
  perl-Pod-Perldoc.noarch 0:3.20-4.el7                                          
  perl-Pod-Simple.noarch 1:3.28-4.el7                                           
  perl-Pod-Usage.noarch 0:1.63-3.el7                                            
  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7                                  
  perl-Socket.x86_64 0:2.010-3.el7                                              
  perl-Storable.x86_64 0:2.45-3.el7                                             
  perl-Text-ParseWords.noarch 0:3.29-4.el7                                      
  perl-Time-HiRes.x86_64 4:1.9725-3.el7                                         
  perl-Time-Local.noarch 0:1.2300-2.el7                                         
  perl-constant.noarch 0:1.27-2.el7                                             
  perl-libs.x86_64 4:5.16.3-286.el7                                             
  perl-macros.x86_64 4:5.16.3-286.el7                                           
  perl-parent.noarch 1:0.225-244.el7                                            
  perl-podlators.noarch 0:2.5.1-3.el7                                           
  perl-threads.x86_64 0:1.87-4.el7                                              
  perl-threads-shared.x86_64 0:1.43-6.el7                                       
  vim-common.x86_64 2:7.4.160-1.el7                                             
  vim-filesystem.x86_64 2:7.4.160-1.el7                                         
  which.x86_64 0:2.20-7.el7                                                     

Complete!
 ---> e1c31cdfc80a
Removing intermediate container 67c59c1a102b
Step 7 : COPY apache-tomcat-8.5.4.tar.gz /opt/
 ---> 96a12268b03e
Removing intermediate container bd3b1df56fdb
Step 8 : COPY jdk-8u101-linux-x64.rpm /opt/
 ---> c23807e38880
Removing intermediate container c9555658f7b4
Step 9 : RUN rpm -ivh /opt/jdk-8u101-linux-x64.rpm
 ---> Running in 55d143ce74e4
Preparing...                          ########################################
Updating / installing...
jdk1.8.0_101-2000:1.8.0_101-fcs       ########################################
Unpacking JAR files...
    tools.jar...
    plugin.jar...
    javaws.jar...
    deploy.jar...
    rt.jar...
    jsse.jar...
    charsets.jar...
    localedata.jar...
 ---> 045ad37adb5a
Removing intermediate container 55d143ce74e4
Step 10 : RUN tar -zxf /opt/apache-tomcat-8.5.4.tar.gz -C /opt/
 ---> Running in 1e0eb78d147f
 ---> 3614a0b56e00
Removing intermediate container 1e0eb78d147f
Step 11 : RUN rm -rf /opt/jdk-7u79-linux-x64.rpm
 ---> Running in df6fbeaeea1c
 ---> 0bb074d692fd
Removing intermediate container df6fbeaeea1c
Step 12 : RUN echo "sh /opt/apache-tomcat-8.5.4/bin/startup.sh" >> /etc/rc.local
 ---> Running in 6e3021cf352f
 ---> 0bd7ffe7bdb4
Removing intermediate container 6e3021cf352f
Step 13 : RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/docs
 ---> Running in 6c17dd120437
 ---> 7b92c4b3a29c
Removing intermediate container 6c17dd120437
Step 14 : RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/examples
 ---> Running in fe14a8302493
 ---> 1a739e122bbf
Removing intermediate container fe14a8302493
Step 15 : RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/host-manager
 ---> Running in 6220e0e7577a
 ---> fc2af1ef4240
Removing intermediate container 6220e0e7577a
Step 16 : RUN rm -rf /opt/apache-tomcat-8.5.4/webapps/manager
 ---> Running in f98867f66193
 ---> 2f62669e4709
Removing intermediate container f98867f66193
Step 17 : RUN yum clean all
 ---> Running in bc9fd475dc7d
Loaded plugins: fastestmirror, ovl
Cleaning repos: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
 ---> b64cf64dffc5
Removing intermediate container bc9fd475dc7d
Step 18 : RUN history -c
 ---> Running in 7b6132a2f97e
 ---> 7135c2568807
Removing intermediate container 7b6132a2f97e
Step 19 : EXPOSE 8080
 ---> Running in 818f799b659b
 ---> 0a74a4091d65
Removing intermediate container 818f799b659b
Step 20 : ENTRYPOINT /bin/bash
 ---> Running in 0dc1fd834f39
 ---> c901722935c4
Removing intermediate container 0dc1fd834f39
Successfully built c901722935c4
[root@xiexianbin_cn docker]# 

登录Docker Hub

[root@xiexianbin_cn ~]# docker login
Username: xiexianbin
Password: 
Email: me@xiexianbin.cn
WARNING: login credentials saved in /root/.dockercfg.
Login Succeeded
[root@xiexianbin_cn ~]# 
Home Archives Categories Tags Docs