容器化部署mall-swarm商城
环境 :
ip | 192.168.100.31 |
---|---|
docker | installed |
docker-compose | installed |
第一步(上传文件)
上传文件,并且解压
shell
[root@master ~]# ls
dat.sh mall-swarm.tar.gz ts.sh
[root@master ~]# tar -zxvf mall-swarm.tar.gz
mall-swarm/
mall-swarm/mall-repo/
mall-swarm/mall-repo/packages/
mall-swarm/mall-repo/packages/centos-indexhtml-7-9.el7.centos.noarch.rpm
mall-swarm/mall-repo/packages/centos-logos-70.0.6-3.el7.centos.noarch.rpm
mall-swarm/mall-repo/packages/createrepo-0.9.9-28.el7.noarch.rpm
mall-swarm/mall-repo/packages/dejavu-fonts-common-2.33-6.el7.noarch.rpm
mall-swarm/mall-repo/packages/dejavu-sans-fonts-2.33-6.el7.noarch.rpm
mall-swarm/mall-repo/packages/deltarpm-3.6-3.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-asn1-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-compiler-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-crypto-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-erts-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-hipe-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-inets-R16B-03.18.el7.x86_64.rpm
mall-swarm/mall-repo/packages/erlang-kernel-R16B-03。。。。。。略
第二步(容器化部署mariadb)
编写repo文件和mariadb启动脚本
shell
[root@k8s-master-node1 mall-swarm]# vi local.repo
[root@k8s-master-node1 mall-swarm]# cat local.repo
[local]
name=local
gpgcheck=0
enabled=1
baseurl=file:///opt/mall-repo
[root@k8s-master-node1 mall-swarm]# cat > init_mariadb.sh << lxf
> #!/bin/bash
> mysql_install_db --user=root
> mysqld_safe --user=root &
> sleep 8
> mysqladmin -u root password 'root'
> mysql -uroot -proot -e "grant all on *.* to 'reader'@'%' identified by '123456'; flush
> privileges;"
> mysql -uroot -proot -e "create database mall; use mall; source /opt/mall.sql;"
> lxf
[root@k8s-master-node1 mall-swarm]#
构建mariadb镜像
shell
[root@k8s-master-node1 mall-swarm]# cat Dockerfile-mariadb
FROM centos:centos7.5.1804
MAINTAINER Lxf
RUN rm -rf /etc/yum.repos.d/*
COPY local.repo /etc/yum.repos.d/
COPY mall-repo /opt/mall-repo
COPY mall.sql /opt/
COPY init_mariadb.sh /opt/
ENV LC_ALL en_US.UTF-8
RUN yum -y install mariadb-server && bash /opt/init_mariadb.sh
EXPOSE 3306
CMD ["mysqld_safe","--user=root"]
[root@k8s-master-node1 mall-swarm]# docker build -t mall-mysql:v1.0 -f Dockerfile-mariadb .
Sending build context to Docker daemon 2.802GB
Step 1/11 : FROM centos:centos7.5.1804
---> cf49811e3cdb
Step 2/11 : MAINTAINER Lxf
---> Running in f8e4516378d4
Removing intermediate container f8e4516378d4
---> 61377550d15f
Step 3/11 : RUN rm -rf /etc/yum.repos.d/*
---> Running in 8a9ee47156b8
Removing intermediate container 8a9ee47156b8
---> 3c3a1d752cfd
Step 4/11 : COPY local.repo /etc/yum.repos.d/
---> 0ed7737bd8d7
Step 5/11 : COPY mall-repo /opt/mall-repo
---> 70dc77483f79
Step 6/11 : COPY mall.sql /opt/
---> 9b15eaebe99b
Step 7/11 : COPY init_mariadb.sh /opt/
---> 2f8be3d1b97e
Step 8/11 : ENV LC_ALL en_US.UTF-8
---> Running in d220bc990bdc
Removing intermediate container d220bc990bdc
---> 699bf8d82d3e
Step 9/11 : RUN yum -y install mariadb-server && bash /opt/init_mariadb.sh
---> Running in aef8c549b835
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package mariadb-server.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: mariadb(x86-64) = 1:5.5.68-1.el7 for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(vars) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(strict) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(Sys::Hostname) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(POSIX) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(File::Path) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(File::Copy) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(File::Basename) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: /usr/bin/perl for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: 1:mariadb-server-5.5.68-1.el7.x86_64
--> Running transaction check
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package mariadb.x86_64 1:5.5.68-1.el7 will be installed
--> Processing Dependency: perl(Exporter) for package: 1:mariadb-5.5.68-1.el7.x86_64
---> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be installed
---> Package perl.x86_64 4:5.16.3-299.el7_9 will be installed
--> Processing Dependency: perl-libs = 4:5.16.3-299.el7_9 for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-299.el7_9.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-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-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.el7.noarch
--> 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-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
---> 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-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-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-5.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Text-ParseWords.noarch 0:3.29-4.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-libs.x86_64 4:5.16.3-299.el7_9 will be installed
---> Package perl-macros.x86_64 4:5.16.3-299.el7_9 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
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-299.el7_9 will be installed
---> 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-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.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:
mariadb-server x86_64 1:5.5.68-1.el7 local 11 M
Installing for dependencies:
groff-base x86_64 1.22.2-8.el7 local 942 k
libaio x86_64 0.3.109-13.el7 local 24 k
mariadb x86_64 1:5.5.68-1.el7 local 8.8 M
mariadb-libs x86_64 1:5.5.68-1.el7 local 760 k
perl x86_64 4:5.16.3-299.el7_9 local 8.0 M
perl-Carp noarch 1.26-244.el7 local 19 k
perl-Compress-Raw-Bzip2 x86_64 2.061-3.el7 local 32 k
perl-Compress-Raw-Zlib x86_64 1:2.061-4.el7 local 57 k
perl-DBD-MySQL x86_64 4.023-6.el7 local 140 k
perl-DBI x86_64 1.627-4.el7 local 802 k
perl-Data-Dumper x86_64 2.145-3.el7 local 47 k
perl-Encode x86_64 2.51-7.el7 local 1.5 M
perl-Exporter noarch 5.68-3.el7 local 28 k
perl-File-Path noarch 2.09-2.el7 local 26 k
perl-File-Temp noarch 0.23.01-3.el7 local 56 k
perl-Filter x86_64 1.49-3.el7 local 76 k
perl-Getopt-Long noarch 2.40-3.el7 local 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 local 38 k
perl-IO-Compress noarch 2.061-2.el7 local 260 k
perl-Net-Daemon noarch 0.48-5.el7 local 51 k
perl-PathTools x86_64 3.40-5.el7 local 82 k
perl-PlRPC noarch 0.2020-14.el7 local 36 k
perl-Pod-Escapes noarch 1:1.04-299.el7_9 local 52 k
perl-Pod-Perldoc noarch 3.20-4.el7 local 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 local 216 k
perl-Pod-Usage noarch 1.63-3.el7 local 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 local 36 k
perl-Socket x86_64 2.010-5.el7 local 49 k
perl-Storable x86_64 2.45-3.el7 local 77 k
perl-Text-ParseWords noarch 3.29-4.el7 local 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 local 45 k
perl-Time-Local noarch 1.2300-2.el7 local 24 k
perl-constant noarch 1.27-2.el7 local 19 k
perl-libs x86_64 4:5.16.3-299.el7_9 local 690 k
perl-macros x86_64 4:5.16.3-299.el7_9 local 44 k
perl-parent noarch 1:0.225-244.el7 local 12 k
perl-podlators noarch 2.5.1-3.el7 local 112 k
perl-threads x86_64 1.87-4.el7 local 49 k
perl-threads-shared x86_64 1.43-6.el7 local 39 k
Transaction Summary
================================================================================
Install 1 Package (+39 Dependent packages)
Total download size: 34 M
Installed size: 154 M
Downloading packages:
--------------------------------------------------------------------------------
Total 680 MB/s | 34 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:mariadb-libs-5.5.68-1.el7.x86_64 1/40
Installing : libaio-0.3.109-13.el7.x86_64 2/40
Installing : groff-base-1.22.2-8.el7.x86_64 3/40
Installing : 1:perl-parent-0.225-244.el7.noarch 4/40
Installing : perl-HTTP-Tiny-0.033-3.el7.noarch 5/40
Installing : perl-podlators-2.5.1-3.el7.noarch 6/40
Installing : perl-Pod-Perldoc-3.20-4.el7.noarch 7/40
Installing : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 8/40
Installing : perl-Encode-2.51-7.el7.x86_64 9/40
Installing : perl-Text-ParseWords-3.29-4.el7.noarch 10/40
Installing : perl-Pod-Usage-1.63-3.el7.noarch 11/40
Installing : 4:perl-macros-5.16.3-299.el7_9.x86_64 12/40
Installing : perl-Storable-2.45-3.el7.x86_64 13/40
Installing : perl-Exporter-5.68-3.el7.noarch 14/40
Installing : perl-constant-1.27-2.el7.noarch 15/40
Installing : perl-Socket-2.010-5.el7.x86_64 16/40
Installing : perl-Time-Local-1.2300-2.el7.noarch 17/40
Installing : perl-Carp-1.26-244.el7.noarch 18/40
Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 19/40
Installing : perl-PathTools-3.40-5.el7.x86_64 20/40
Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64 21/40
Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch 22/40
Installing : perl-File-Temp-0.23.01-3.el7.noarch 23/40
Installing : perl-File-Path-2.09-2.el7.noarch 24/40
Installing : perl-threads-shared-1.43-6.el7.x86_64 25/40
Installing : perl-threads-1.87-4.el7.x86_64 26/40
Installing : perl-Filter-1.49-3.el7.x86_64 27/40
Installing : 4:perl-libs-5.16.3-299.el7_9.x86_64 28/40
Installing : perl-Getopt-Long-2.40-3.el7.noarch 29/40
Installing : 4:perl-5.16.3-299.el7_9.x86_64 30/40
Installing : perl-Data-Dumper-2.145-3.el7.x86_64 31/40
Installing : perl-Net-Daemon-0.48-5.el7.noarch 32/40
Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 33/40
Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 34/40
Installing : perl-IO-Compress-2.061-2.el7.noarch 35/40
Installing : perl-PlRPC-0.2020-14.el7.noarch 36/40
Installing : perl-DBI-1.627-4.el7.x86_64 37/40
Installing : perl-DBD-MySQL-4.023-6.el7.x86_64 38/40
Installing : 1:mariadb-5.5.68-1.el7.x86_64 39/40
Installing : 1:mariadb-server-5.5.68-1.el7.x86_64 40/40
Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 1/40
Verifying : 1:mariadb-server-5.5.68-1.el7.x86_64 2/40
Verifying : perl-threads-shared-1.43-6.el7.x86_64 3/40
Verifying : perl-Storable-2.45-3.el7.x86_64 4/40
Verifying : perl-DBD-MySQL-4.023-6.el7.x86_64 5/40
Verifying : perl-Exporter-5.68-3.el7.noarch 6/40
Verifying : perl-constant-1.27-2.el7.noarch 7/40
Verifying : perl-PathTools-3.40-5.el7.x86_64 8/40
Verifying : 4:perl-macros-5.16.3-299.el7_9.x86_64 9/40
Verifying : 1:perl-parent-0.225-244.el7.noarch 10/40
Verifying : perl-Socket-2.010-5.el7.x86_64 11/40
Verifying : perl-Net-Daemon-0.48-5.el7.noarch 12/40
Verifying : groff-base-1.22.2-8.el7.x86_64 13/40
Verifying : perl-File-Temp-0.23.01-3.el7.noarch 14/40
Verifying : 1:perl-Pod-Simple-3.28-4.el7.noarch 15/40
Verifying : perl-Time-Local-1.2300-2.el7.noarch 16/40
Verifying : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 17/40
Verifying : perl-DBI-1.627-4.el7.x86_64 18/40
Verifying : libaio-0.3.109-13.el7.x86_64 19/40
Verifying : perl-Carp-1.26-244.el7.noarch 20/40
Verifying : 1:mariadb-libs-5.5.68-1.el7.x86_64 21/40
Verifying : perl-Data-Dumper-2.145-3.el7.x86_64 22/40
Verifying : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64 23/40
Verifying : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 24/40
Verifying : perl-Scalar-List-Utils-1.27-248.el7.x86_64 25/40
Verifying : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64 26/40
Verifying : perl-IO-Compress-2.061-2.el7.noarch 27/40
Verifying : perl-Pod-Usage-1.63-3.el7.noarch 28/40
Verifying : perl-PlRPC-0.2020-14.el7.noarch 29/40
Verifying : perl-Encode-2.51-7.el7.x86_64 30/40
Verifying : perl-Pod-Perldoc-3.20-4.el7.noarch 31/40
Verifying : perl-podlators-2.5.1-3.el7.noarch 32/40
Verifying : 4:perl-5.16.3-299.el7_9.x86_64 33/40
Verifying : perl-File-Path-2.09-2.el7.noarch 34/40
Verifying : perl-threads-1.87-4.el7.x86_64 35/40
Verifying : 1:mariadb-5.5.68-1.el7.x86_64 36/40
Verifying : perl-Filter-1.49-3.el7.x86_64 37/40
Verifying : perl-Getopt-Long-2.40-3.el7.noarch 38/40
Verifying : perl-Text-ParseWords-3.29-4.el7.noarch 39/40
Verifying : 4:perl-libs-5.16.3-299.el7_9.x86_64 40/40
Installed:
mariadb-server.x86_64 1:5.5.68-1.el7
Dependency Installed:
groff-base.x86_64 0:1.22.2-8.el7
libaio.x86_64 0:0.3.109-13.el7
mariadb.x86_64 1:5.5.68-1.el7
mariadb-libs.x86_64 1:5.5.68-1.el7
perl.x86_64 4:5.16.3-299.el7_9
perl-Carp.noarch 0:1.26-244.el7
perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7
perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7
perl-DBD-MySQL.x86_64 0:4.023-6.el7
perl-DBI.x86_64 0:1.627-4.el7
perl-Data-Dumper.x86_64 0:2.145-3.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-3.el7
perl-HTTP-Tiny.noarch 0:0.033-3.el7
perl-IO-Compress.noarch 0:2.061-2.el7
perl-Net-Daemon.noarch 0:0.48-5.el7
perl-PathTools.x86_64 0:3.40-5.el7
perl-PlRPC.noarch 0:0.2020-14.el7
perl-Pod-Escapes.noarch 1:1.04-299.el7_9
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-5.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-299.el7_9
perl-macros.x86_64 4:5.16.3-299.el7_9
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
Complete!
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
240412 5:00:02 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 57 ...
OK
Filling help tables...
240412 5:00:02 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 65 ...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h aef8c549b835 password 'new-password'
Alternatively you can run:
'/usr/bin/mysql_secure_installation'
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.
You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl
Please report any problems at http://mariadb.org/jira
The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
240412 05:00:02 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
240412 05:00:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Removing intermediate container aef8c549b835
---> 40d5f83f0166
Step 10/11 : EXPOSE 3306
---> Running in 4606b799f1fd
Removing intermediate container 4606b799f1fd
---> fa8468d33c9d
Step 11/11 : CMD ["mysqld_safe","--user=root"]
---> Running in eba4772c17c9
Removing intermediate container eba4772c17c9
---> 2792bb686378
Successfully built 2792bb686378
Successfully tagged mall-mysql:v1.0
第三步(容器化部署redis)
shell
[root@k8s-master-node1 mall-swarm]# docker build -t mall-redis -f Dockerfile-redis .
Sending build context to Docker daemon 2.802GB
Step 1/9 : FROM centos:centos7.5.1804
---> cf49811e3cdb
Step 2/9 : MAINTAINER lxf
---> Using cache
---> d1eb9be73ca0
Step 3/9 : RUN rm -rf /etc/yum.repos.d/*
---> Using cache
---> 191a991c3bf0
Step 4/9 : COPY local.repo /etc/yum.repos.d/
---> Using cache
---> aa52458d931c
Step 5/9 : COPY mall-repo /opt/mall-repo
---> 6e179e2746fd
Step 6/9 : RUN yum -y install redis
---> Running in 33b8773b00a2
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package redis.x86_64 0:3.2.12-2.el7 will be installed
--> Processing Dependency: logrotate for package: redis-3.2.12-2.el7.x86_64
--> Processing Dependency: libjemalloc.so.1()(64bit) for package: redis-3.2.12-2.el7.x86_64
--> Running transaction check
---> Package jemalloc.x86_64 0:3.6.0-1.el7 will be installed
---> Package logrotate.x86_64 0:3.8.6-19.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
redis x86_64 3.2.12-2.el7 local 544 k
Installing for dependencies:
jemalloc x86_64 3.6.0-1.el7 local 105 k
logrotate x86_64 3.8.6-19.el7 local 70 k
Transaction Summary
================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 718 k
Installed size: 1.8 M
Downloading packages:
--------------------------------------------------------------------------------
Total 254 MB/s | 718 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : logrotate-3.8.6-19.el7.x86_64 1/3
Installing : jemalloc-3.6.0-1.el7.x86_64 2/3
Installing : redis-3.2.12-2.el7.x86_64 3/3
Verifying : redis-3.2.12-2.el7.x86_64 1/3
Verifying : jemalloc-3.6.0-1.el7.x86_64 2/3
Verifying : logrotate-3.8.6-19.el7.x86_64 3/3
Installed:
redis.x86_64 0:3.2.12-2.el7
Dependency Installed:
jemalloc.x86_64 0:3.6.0-1.el7 logrotate.x86_64 0:3.8.6-19.el7
Complete!
Removing intermediate container 33b8773b00a2
---> 5882ae482425
Step 7/9 : RUN sed -i 's/127.0.0.1/0.0.0.0/g' /etc/redis.conf && sed -i 's/protected-mode yes/protected-mode no/g' /etc/redis.conf
---> Running in 50b5c2ed3527
Removing intermediate container 50b5c2ed3527
---> b203d3c51746
Step 8/9 : EXPOSE 6379
---> Running in 087b883ac693
Removing intermediate container 087b883ac693
---> bc7c74513ad5
Step 9/9 : CMD ["/usr/bin/redis-server","/etc/redis.conf"]
---> Running in 15ae02abe29e
Removing intermediate container 15ae02abe29e
---> eecc30a9845f
Successfully built eecc30a9845f
Successfully tagged mall-redis:latest
[root@k8s-master-node1 mall-swarm]# docker ps | grep redis
491615b06076 goharbor/redis-photon:v2.3.4 "redis-server /etc/r..." 2 weeks ago Up 2 weeks (healthy) redis
[root@k8s-master-node1 mall-swarm]#
第四步(容器化部署rabbitMQ)
编写rabbitmq用户脚本
shell
[root@k8s-master-node1 mall-swarm]# cat rabbitmq-user.sh
#!/bin/bash
/usr/lib/rabbitmq/bin/rabbitmq-server restart
sleep 8
/usr/lib/rabbitmq/bin/rabbitmqctl add_vhost mall
/usr/lib/rabbitmq/bin/rabbitmqctl add_user mall mall
/usr/lib/rabbitmq/bin/rabbitmqctl set_user_tags mall administrator
/usr/lib/rabbitmq/bin/rabbitmqctl set_permissions -p mall mall '.*' '.*' '.*'
/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
/usr/lib/rabbitmq/bin/rabbitmq-server restart
[root@k8s-master-node1 mall-swarm]#
构建Dockerfile-rabbitmq
shell
[root@k8s-master-node1 mall-swarm]# cat Dockerfile-rebbitmq
FROM centos:centos7.5.1804
MAINTAINER lxf
RUN rm -rf /etc/yum.repos.d/*
COPY mall-repo /opt/mall-repo
COPY local.repo /etc/yum.repos.d/local.repo
RUN yum -y install rabbitmq-server
COPY rabbitmq-user.sh /opt/rabbitmq-user.sh
EXPOSE 5672 15672
CMD ["/bin/bash","/opt/rabbitmq-user.sh"]
[root@k8s-master-node1 mall-swarm]# docker build -t mall-rabbit:v1.0 -f Dockerfile-rebbitmq .
Sending build context to Docker daemon 2.802GB
Step 1/9 : FROM centos:centos7.5.1804
---> cf49811e3cdb
Step 2/9 : MAINTAINER lxf
---> Using cache
---> d1eb9be73ca0
Step 3/9 : RUN rm -rf /etc/yum.repos.d/*
---> Using cache
---> 191a991c3bf0
Step 4/9 : COPY mall-repo /opt/mall-repo
---> 3b35de4bb012
Step 5/9 : COPY local.repo /etc/yum.repos.d/local.repo
---> 46747e5f3c4e
Step 6/9 : RUN yum -y install rabbitmq-server
---> Running in 5ebe2a4f87bd
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.3.5-34.el7 will be installed
--> Processing Dependency: erlang-xmerl >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-tools >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-stdlib >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-ssl >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-sasl >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-public_key >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-os_mon >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-mnesia >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-kernel >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-erts >= R12B-3 for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: logrotate for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Processing Dependency: erlang-sd_notify for package: rabbitmq-server-3.3.5-34.el7.noarch
--> Running transaction check
---> Package erlang-erts.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: lksctp-tools for package: erlang-erts-R16B-03.18.el7.x86_64
---> Package erlang-kernel.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-mnesia.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-os_mon.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-snmp(x86-64) = R16B-03.18.el7 for package: erlang-os_mon-R16B-03.18.el7.x86_64
--> Processing Dependency: erlang-otp_mibs(x86-64) = R16B-03.18.el7 for package: erlang-os_mon-R16B-03.18.el7.x86_64
---> Package erlang-public_key.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-crypto(x86-64) = R16B-03.18.el7 for package: erlang-public_key-R16B-03.18.el7.x86_64
--> Processing Dependency: erlang-asn1(x86-64) = R16B-03.18.el7 for package: erlang-public_key-R16B-03.18.el7.x86_64
---> Package erlang-sasl.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-sd_notify.x86_64 0:0.1-1.el7 will be installed
---> Package erlang-ssl.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-stdlib.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-compiler(x86-64) = R16B-03.18.el7 for package: erlang-stdlib-R16B-03.18.el7.x86_64
---> Package erlang-tools.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-runtime_tools(x86-64) = R16B-03.18.el7 for package: erlang-tools-R16B-03.18.el7.x86_64
--> Processing Dependency: erlang-inets(x86-64) = R16B-03.18.el7 for package: erlang-tools-R16B-03.18.el7.x86_64
---> Package erlang-xmerl.x86_64 0:R16B-03.18.el7 will be installed
---> Package logrotate.x86_64 0:3.8.6-19.el7 will be installed
--> Running transaction check
---> Package erlang-asn1.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-compiler.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-hipe(x86-64) = R16B-03.18.el7 for package: erlang-compiler-R16B-03.18.el7.x86_64
---> Package erlang-crypto.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-inets.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-otp_mibs.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-runtime_tools.x86_64 0:R16B-03.18.el7 will be installed
---> Package erlang-snmp.x86_64 0:R16B-03.18.el7 will be installed
---> Package lksctp-tools.x86_64 0:1.0.17-2.el7 will be installed
--> Running transaction check
---> Package erlang-hipe.x86_64 0:R16B-03.18.el7 will be installed
--> Processing Dependency: erlang-syntax_tools(x86-64) = R16B-03.18.el7 for package: erlang-hipe-R16B-03.18.el7.x86_64
--> Running transaction check
---> Package erlang-syntax_tools.x86_64 0:R16B-03.18.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rabbitmq-server noarch 3.3.5-34.el7 local 4.0 M
Installing for dependencies:
erlang-asn1 x86_64 R16B-03.18.el7 local 758 k
erlang-compiler x86_64 R16B-03.18.el7 local 1.0 M
erlang-crypto x86_64 R16B-03.18.el7 local 86 k
erlang-erts x86_64 R16B-03.18.el7 local 2.5 M
erlang-hipe x86_64 R16B-03.18.el7 local 2.4 M
erlang-inets x86_64 R16B-03.18.el7 local 800 k
erlang-kernel x86_64 R16B-03.18.el7 local 1.1 M
erlang-mnesia x86_64 R16B-03.18.el7 local 700 k
erlang-os_mon x86_64 R16B-03.18.el7 local 115 k
erlang-otp_mibs x86_64 R16B-03.18.el7 local 32 k
erlang-public_key x86_64 R16B-03.18.el7 local 538 k
erlang-runtime_tools x86_64 R16B-03.18.el7 local 179 k
erlang-sasl x86_64 R16B-03.18.el7 local 293 k
erlang-sd_notify x86_64 0.1-1.el7 local 9.1 k
erlang-snmp x86_64 R16B-03.18.el7 local 1.5 M
erlang-ssl x86_64 R16B-03.18.el7 local 588 k
erlang-stdlib x86_64 R16B-03.18.el7 local 2.2 M
erlang-syntax_tools x86_64 R16B-03.18.el7 local 336 k
erlang-tools x86_64 R16B-03.18.el7 local 566 k
erlang-xmerl x86_64 R16B-03.18.el7 local 998 k
lksctp-tools x86_64 1.0.17-2.el7 local 88 k
logrotate x86_64 3.8.6-19.el7 local 70 k
Transaction Summary
================================================================================
Install 1 Package (+22 Dependent packages)
Total download size: 21 M
Installed size: 36 M
Downloading packages:
--------------------------------------------------------------------------------
Total 593 MB/s | 21 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : logrotate-3.8.6-19.el7.x86_64 1/23
Installing : lksctp-tools-1.0.17-2.el7.x86_64 2/23
Installing : erlang-crypto-R16B-03.18.el7.x86_64 3/23
Installing : erlang-kernel-R16B-03.18.el7.x86_64 4/23
Installing : erlang-stdlib-R16B-03.18.el7.x86_64 5/23
Installing : erlang-erts-R16B-03.18.el7.x86_64 6/23
Installing : erlang-syntax_tools-R16B-03.18.el7.x86_64 7/23
Installing : erlang-compiler-R16B-03.18.el7.x86_64 8/23
Installing : erlang-hipe-R16B-03.18.el7.x86_64 9/23
Installing : erlang-mnesia-R16B-03.18.el7.x86_64 10/23
Installing : erlang-runtime_tools-R16B-03.18.el7.x86_64 11/23
Installing : erlang-snmp-R16B-03.18.el7.x86_64 12/23
Installing : erlang-otp_mibs-R16B-03.18.el7.x86_64 13/23
Installing : erlang-sd_notify-0.1-1.el7.x86_64 14/23
Installing : erlang-xmerl-R16B-03.18.el7.x86_64 15/23
Installing : erlang-asn1-R16B-03.18.el7.x86_64 16/23
Installing : erlang-public_key-R16B-03.18.el7.x86_64 17/23
Installing : erlang-ssl-R16B-03.18.el7.x86_64 18/23
Installing : erlang-inets-R16B-03.18.el7.x86_64 19/23
Installing : erlang-tools-R16B-03.18.el7.x86_64 20/23
Installing : erlang-sasl-R16B-03.18.el7.x86_64 21/23
Installing : erlang-os_mon-R16B-03.18.el7.x86_64 22/23
Installing : rabbitmq-server-3.3.5-34.el7.noarch 23/23
Failed to get D-Bus connection: Operation not permitted
warning: %post(rabbitmq-server-3.3.5-34.el7.noarch) scriptlet failed, exit status 1
Non-fatal POSTIN scriptlet failure in rpm package rabbitmq-server-3.3.5-34.el7.noarch
Verifying : erlang-sd_notify-0.1-1.el7.x86_64 1/23
Verifying : rabbitmq-server-3.3.5-34.el7.noarch 2/23
Verifying : erlang-erts-R16B-03.18.el7.x86_64 3/23
Verifying : erlang-stdlib-R16B-03.18.el7.x86_64 4/23
Verifying : erlang-compiler-R16B-03.18.el7.x86_64 5/23
Verifying : erlang-mnesia-R16B-03.18.el7.x86_64 6/23
Verifying : erlang-crypto-R16B-03.18.el7.x86_64 7/23
Verifying : erlang-hipe-R16B-03.18.el7.x86_64 8/23
Verifying : erlang-inets-R16B-03.18.el7.x86_64 9/23
Verifying : erlang-runtime_tools-R16B-03.18.el7.x86_64 10/23
Verifying : erlang-public_key-R16B-03.18.el7.x86_64 11/23
Verifying : erlang-sasl-R16B-03.18.el7.x86_64 12/23
Verifying : erlang-kernel-R16B-03.18.el7.x86_64 13/23
Verifying : lksctp-tools-1.0.17-2.el7.x86_64 14/23
Verifying : erlang-ssl-R16B-03.18.el7.x86_64 15/23
Verifying : erlang-xmerl-R16B-03.18.el7.x86_64 16/23
Verifying : erlang-os_mon-R16B-03.18.el7.x86_64 17/23
Verifying : erlang-otp_mibs-R16B-03.18.el7.x86_64 18/23
Verifying : erlang-tools-R16B-03.18.el7.x86_64 19/23
Verifying : erlang-snmp-R16B-03.18.el7.x86_64 20/23
Verifying : erlang-syntax_tools-R16B-03.18.el7.x86_64 21/23
Verifying : logrotate-3.8.6-19.el7.x86_64 22/23
Verifying : erlang-asn1-R16B-03.18.el7.x86_64 23/23
Installed:
rabbitmq-server.noarch 0:3.3.5-34.el7
Dependency Installed:
erlang-asn1.x86_64 0:R16B-03.18.el7
erlang-compiler.x86_64 0:R16B-03.18.el7
erlang-crypto.x86_64 0:R16B-03.18.el7
erlang-erts.x86_64 0:R16B-03.18.el7
erlang-hipe.x86_64 0:R16B-03.18.el7
erlang-inets.x86_64 0:R16B-03.18.el7
erlang-kernel.x86_64 0:R16B-03.18.el7
erlang-mnesia.x86_64 0:R16B-03.18.el7
erlang-os_mon.x86_64 0:R16B-03.18.el7
erlang-otp_mibs.x86_64 0:R16B-03.18.el7
erlang-public_key.x86_64 0:R16B-03.18.el7
erlang-runtime_tools.x86_64 0:R16B-03.18.el7
erlang-sasl.x86_64 0:R16B-03.18.el7
erlang-sd_notify.x86_64 0:0.1-1.el7
erlang-snmp.x86_64 0:R16B-03.18.el7
erlang-ssl.x86_64 0:R16B-03.18.el7
erlang-stdlib.x86_64 0:R16B-03.18.el7
erlang-syntax_tools.x86_64 0:R16B-03.18.el7
erlang-tools.x86_64 0:R16B-03.18.el7
erlang-xmerl.x86_64 0:R16B-03.18.el7
lksctp-tools.x86_64 0:1.0.17-2.el7
logrotate.x86_64 0:3.8.6-19.el7
Complete!
Removing intermediate container 5ebe2a4f87bd
---> 23548fecbc83
Step 7/9 : COPY rabbitmq-user.sh /opt/rabbitmq-user.sh
---> 36083d4f16c7
Step 8/9 : EXPOSE 5672 15672
---> Running in eef1fbc95d2a
Removing intermediate container eef1fbc95d2a
---> e287de9c393a
Step 9/9 : CMD ["/bin/bash","/opt/rabbitmq-user.sh"]
---> Running in 45b92bc0ace4
Removing intermediate container 45b92bc0ace4
---> 0edb48e232b3
Successfully built 0edb48e232b3
Successfully tagged mall-rabbit:v1.0
[root@k8s-master-node1 mall-swarm]#
检查镜像
shell
[root@k8s-master-node1 mall-swarm]# docker images | grep mall
mall-rabbit v1.0 0edb48e232b3 About a minute ago 374MB
mall-mysql v1.0 2792bb686378 29 minutes ago 522MB
mall-redis latest eecc30a9845f 31 minutes ago 338MB
[root@k8s-master-node1 mall-swarm]#
第五步 (容器化部署nacos-registry)
第一步编写nacos-registry启动脚本
shell
[root@k8s-master-node1 mall-swarm]# cat nacos-start.sh
#!/bin/bash
/usr/local/bin/nacos/bin/startup.sh -m standalone
tail -f /usr/local/bin/nacos/logs/start.out
第二步编写dockerfile
shell
[root@k8s-master-node1 mall-swarm]# cat Dockerfile-nacos
FROM centos:centos7.5.1804
MAINTAINER lxf
RUN rm -rf /etc/yum.repos.d/*
COPY local.repo /etc/yum.repos.d/
COPY mall-repo /opt/mall-repo
COPY nacos-start.sh /opt/nacos-start.sh
ADD jdk-8u121-linux-x64.tar.gz /usr/local/bin/
ADD nacos-server-1.1.0.tar.gz /usr/local/bin/
ENV JAVA_HOME /usr/local/bin//jdk1.8.0_121
EXPOSE 8848
CMD ["/bin/bash","/opt/nacos-start.sh"]
[root@k8s-master-node1 mall-swarm]# docker build -t mall-nacos:v1.0 -f Dockerfile-nacos .
Sending build context to Docker daemon 2.802GB
Step 1/11 : FROM centos:centos7.5.1804
---> cf49811e3cdb
Step 2/11 : MAINTAINER lxf
---> Using cache
---> d1eb9be73ca0
Step 3/11 : RUN rm -rf /etc/yum.repos.d/*
---> Using cache
---> 191a991c3bf0
Step 4/11 : COPY local.repo /etc/yum.repos.d/
---> Using cache
---> aa52458d931c
Step 5/11 : COPY mall-repo /opt/mall-repo
---> Using cache
---> 6e179e2746fd
Step 6/11 : COPY nacos-start.sh /opt/nacos-start.sh
---> d1f96954d7c2
Step 7/11 : ADD jdk-8u121-linux-x64.tar.gz /usr/local/bin/
---> 30da0c08b585
Step 8/11 : ADD nacos-server-1.1.0.tar.gz /usr/local/bin/
---> 4733ea9349aa
Step 9/11 : ENV JAVA_HOME /usr/local/bin//jdk1.8.0_121
---> Running in e7736e35b61b
Removing intermediate container e7736e35b61b
---> 04377d9567fc
Step 10/11 : EXPOSE 8848
---> Running in 1b0595f2901c
Removing intermediate container 1b0595f2901c
---> 89c79bc247c9
Step 11/11 : CMD ["/bin/bash","/opt/nacos-start.sh"]
---> Running in 4ae8c0ce6340
Removing intermediate container 4ae8c0ce6340
---> 962942fa6541
Successfully built 962942fa6541
Successfully tagged mall-nacos:v1.0
[root@k8s-master-node1 mall-swarm]#
第六步 (容器化部署前端服务)
第一步生成前端文件
shell
[root@k8s-master-node1 mall-swarm]# tar -zxvf mall-admin-web.tar.gz
[root@k8s-master-node1 mall-swarm]# ls
centos7.5.1804.tar.gz Dockerfile-redis local.repo mall.sql node-v6.17.1-linux-x64.tar.gz
Dockerfile-mariadb images mall-admin-web nacos-server-1.1.0.tar.gz rabbitmq-user.sh
Dockerfile-nacos init_mariadb.sh mall-admin-web.tar.gz nacos-start.sh
Dockerfile-rebbitmq jdk-8u121-linux-x64.tar.gz mall-repo
#修改前端配置文件 将ip地址改为自己的IP地址
[root@k8s-master-node1 mall-admin-web]# cat config/prod.env.js
'use strict'
module.exports = {
NODE_ENV: '"production"',
BASE_API: '"http://192.168.100.31:8201/mall-admin"'
}
[root@k8s-master-node1 mall-swarm]# tar -zxvf node-v6.17.1-linux-x64.tar.gz
................
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/LICENSE
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/read/node_modules/mute-stream/README.md
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/inherits_browser.js
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/package.json
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/LICENSE
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/README.md
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/inherits/inherits.js
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/package.json
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/LICENSE
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/ChangeLog
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/index.js
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/README.md
node-v6.17.1-linux-x64/lib/node_modules/npm/node_modules/umask/.npmignore
..........略
[root@k8s-master-node1 mall-swarm]# mv node-v6.17.1-linux-x64 /usr/local/node
[root@k8s-master-node1 mall-swarm]# vi /etc/profile
[root@k8s-master-node1 mall-swarm]# cat /etc/profile | grep "EXPORT"
EXPORT NODE_HOME=/usr/local/node
EXPORT PATH=$NODE_HOME/bin:$PATH
[root@k8s-master-node1 mall-swarm]# source /etc/profile
[root@k8s-master-node1 mall-swarm]# node -v
v6.17.1
[root@k8s-master-node1 mall-swarm]# npm -v
3.10.10
[root@k8s-master-node1 mall-admin-web]# npm run build
> mall-admin-web@1.0.0 build /root/mall-swarm/mall-admin-web
> node build/build.js
⠦ building for production...Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Hash: 273c058348d34d9c9068
Version: webpack 3.12.0
Time: 46519ms
Asset Size Chunks Chunk Names
static/js/16.b49e0f38468ae9d70307.js.map 27.1 kB 16 [emitted]
static/fonts/element-icons.535877f.woff 28.2 kB [emitted]
static/img/gif_404.6b8ae1d.gif 1.07 MB [emitted] [big]
static/img/login_center_bg.5307896.png 34.5 kB [emitted]
static/js/0.f2bf2004d16ac25da023.js 15.9 kB 0 [emitted] vendor-async
static/js/1.0875f42bb4194530d715.js 53.7 kB 1 [emitted]
static/js/2.2678a19c7ed0f35fcd9b.js 53.7 kB 2 [emitted]
static/js/3.20d4e8b4597a9402a890.js 4.44 kB 3 [emitted]
static/js/4.34f2a80e8448118fab0c.js 122 kB 4 [emitted]
static/js/5.294ddc1350ef52820a7e.js 30.2 kB 5 [emitted]
static/js/6.117ecf31357960633595.js 4.26 kB 6 [emitted]
static/js/7.60b0c1c6d440af77f2fc.js 4.25 kB 7 [emitted]
static/js/8.cbbbc278eef7f13c7c21.js 14.1 kB 8 [emitted]
static/js/9.5c45421091e66720471f.js 7.29 kB 9 [emitted]
static/js/10.c7d831b7fba1a76723f7.js 6.2 kB 10 [emitted]
static/js/11.7c643b95106a0c33af33.js 6.2 kB 11 [emitted]
static/js/12.fdaa2b7958dfef4e91da.js 11.6 kB 12 [emitted]
static/js/13.683bed3faf965b022710.js 11.6 kB 13 [emitted]
static/js/14.07feb5d8ea66d4e497dc.js 4.32 kB 14 [emitted]
static/js/15.1d54d37535eabc23c5d7.js 4.32 kB 15 [emitted]
static/js/16.b49e0f38468ae9d70307.js 7.29 kB 16 [emitted]
static/js/17.bfed87f041d5e4956cd2.js 5.26 kB 17 [emitted]
static/js/18.261da690b4885a0dc95a.js 5.26 kB 18 [emitted]
static/js/19.af20a48d3ae2c0e0f688.js 4.92 kB 19 [emitted]
static/js/20.d84251d5c466ea1f1700.js 1.33 kB 20 [emitted]
static/js/21.8a59ad9d6d0a928d39f3.js 7.97 kB 21 [emitted]
static/js/22.8456cc6ba573abcb4555.js 15.4 kB 22 [emitted]
static/js/23.65cc0310af9c12fd18e7.js 8.91 kB 23 [emitted]
static/js/24.ff9fb25a3305c04ddfd3.js 4.52 kB 24 [emitted]
static/js/25.8eeff544bb298290deda.js 6.62 kB 25 [emitted]
static/js/26.c8813b144d54d146e7b7.js 3.17 kB 26 [emitted]
static/js/27.6d9895516461a47fe367.js 17.4 kB 27 [emitted]
static/js/28.334ce99fc266cfaf1c53.js 10.3 kB 28 [emitted]
static/js/29.43a81c834eec5fcfc777.js 6.24 kB 29 [emitted]
static/js/30.b9b20a4bef81ebe5ad17.js 2.05 kB 30 [emitted]
static/js/31.df94565ea24e6f170b97.js 5.95 kB 31 [emitted]
static/js/32.cb09303c4f2a1d42cc16.js 8.37 kB 32 [emitted]
static/js/33.b39910a1d053b50bb60e.js 9.11 kB 33 [emitted]
static/js/34.0ca57f6982a1e69af763.js 4.51 kB 34 [emitted]
static/js/35.e44caccf41be56716713.js 5.79 kB 35 [emitted]
static/js/36.7fd020a5abdbed9bb95e.js 12.6 kB 36 [emitted]
static/js/37.013ee7fd7ef7ce6c4102.js 12.6 kB 37 [emitted]
static/js/38.53b4ca6676af69d23186.js 5.27 kB 38 [emitted]
static/js/39.e3251db27f0db435d542.js 3.21 kB 39 [emitted]
static/js/40.242c43c4e3a6f5242157.js 7.07 kB 40 [emitted]
static/js/41.e3dfead365e9757292a7.js 8.2 kB 41 [emitted]
static/js/42.8e63c3e2133c66968fce.js 7.91 kB 42 [emitted]
static/js/43.5a30ba060ddf532477ab.js 12.6 kB 43 [emitted]
static/js/44.0f857fca6f8d6ca40bfc.js 8.35 kB 44 [emitted]
static/js/45.1d01e1dcfdb98a4bcc11.js 7.62 kB 45 [emitted]
static/js/46.36db779ffe4f9e5306c1.js 11.3 kB 46 [emitted]
static/js/47.ee2cd2c99f8538dbe06e.js 12.8 kB 47 [emitted]
static/js/vendor.55422cfb17fdcfaf3d31.js 1.81 MB 48 [emitted] [big] vendor
static/js/app.ec3ab9add94d0decbc84.js 101 kB 49 [emitted] app
static/js/manifest.f5df4bdeb20e097c92f1.js 2.67 kB 50 [emitted] manifest
static/css/app.4db9a20080303c2aa12916e135f919a3.css 247 kB 49 [emitted] app
static/css/app.4db9a20080303c2aa12916e135f919a3.css.map 370 kB [emitted]
static/js/0.f2bf2004d16ac25da023.js.map 58.9 kB 0 [emitted] vendor-async
static/js/1.0875f42bb4194530d715.js.map 185 kB 1 [emitted]
static/js/2.2678a19c7ed0f35fcd9b.js.map 185 kB 2 [emitted]
static/js/3.20d4e8b4597a9402a890.js.map 16.1 kB 3 [emitted]
static/js/4.34f2a80e8448118fab0c.js.map 287 kB 4 [emitted]
static/js/5.294ddc1350ef52820a7e.js.map 59.3 kB 5 [emitted]
static/js/6.117ecf31357960633595.js.map 17.8 kB 6 [emitted]
static/js/7.60b0c1c6d440af77f2fc.js.map 17.8 kB 7 [emitted]
static/js/8.cbbbc278eef7f13c7c21.js.map 47.1 kB 8 [emitted]
static/js/9.5c45421091e66720471f.js.map 27.1 kB 9 [emitted]
static/js/10.c7d831b7fba1a76723f7.js.map 23.2 kB 10 [emitted]
static/js/11.7c643b95106a0c33af33.js.map 23.2 kB 11 [emitted]
static/js/12.fdaa2b7958dfef4e91da.js.map 39.7 kB 12 [emitted]
static/js/13.683bed3faf965b022710.js.map 39.7 kB 13 [emitted]
static/js/14.07feb5d8ea66d4e497dc.js.map 18 kB 14 [emitted]
static/js/15.1d54d37535eabc23c5d7.js.map 18 kB 15 [emitted]
static/fonts/element-icons.732389d.ttf 56 kB [emitted]
static/js/17.bfed87f041d5e4956cd2.js.map 20.7 kB 17 [emitted]
static/js/18.261da690b4885a0dc95a.js.map 20.7 kB 18 [emitted]
static/js/19.af20a48d3ae2c0e0f688.js.map 19.2 kB 19 [emitted]
static/js/20.d84251d5c466ea1f1700.js.map 6.34 kB 20 [emitted]
static/js/21.8a59ad9d6d0a928d39f3.js.map 26.9 kB 21 [emitted]
static/js/22.8456cc6ba573abcb4555.js.map 47.3 kB 22 [emitted]
static/js/23.65cc0310af9c12fd18e7.js.map 29.4 kB 23 [emitted]
static/js/24.ff9fb25a3305c04ddfd3.js.map 16.7 kB 24 [emitted]
static/js/25.8eeff544bb298290deda.js.map 22.1 kB 25 [emitted]
static/js/26.c8813b144d54d146e7b7.js.map 12.2 kB 26 [emitted]
static/js/27.6d9895516461a47fe367.js.map 55.5 kB 27 [emitted]
static/js/28.334ce99fc266cfaf1c53.js.map 33.7 kB 28 [emitted]
static/js/29.43a81c834eec5fcfc777.js.map 21.9 kB 29 [emitted]
static/js/30.b9b20a4bef81ebe5ad17.js.map 8.97 kB 30 [emitted]
static/js/31.df94565ea24e6f170b97.js.map 20.8 kB 31 [emitted]
static/js/32.cb09303c4f2a1d42cc16.js.map 29.4 kB 32 [emitted]
static/js/33.b39910a1d053b50bb60e.js.map 30.1 kB 33 [emitted]
static/js/34.0ca57f6982a1e69af763.js.map 16.3 kB 34 [emitted]
static/js/35.e44caccf41be56716713.js.map 20.4 kB 35 [emitted]
static/js/36.7fd020a5abdbed9bb95e.js.map 39.8 kB 36 [emitted]
static/js/37.013ee7fd7ef7ce6c4102.js.map 39.7 kB 37 [emitted]
static/js/38.53b4ca6676af69d23186.js.map 18.9 kB 38 [emitted]
static/js/39.e3251db27f0db435d542.js.map 12.6 kB 39 [emitted]
static/js/40.242c43c4e3a6f5242157.js.map 24.8 kB 40 [emitted]
static/js/41.e3dfead365e9757292a7.js.map 27.6 kB 41 [emitted]
static/js/42.8e63c3e2133c66968fce.js.map 27 kB 42 [emitted]
static/js/43.5a30ba060ddf532477ab.js.map 39.8 kB 43 [emitted]
static/js/44.0f857fca6f8d6ca40bfc.js.map 28.3 kB 44 [emitted]
static/js/45.1d01e1dcfdb98a4bcc11.js.map 25.9 kB 45 [emitted]
static/js/46.36db779ffe4f9e5306c1.js.map 35.8 kB 46 [emitted]
static/js/47.ee2cd2c99f8538dbe06e.js.map 40.5 kB 47 [emitted]
static/js/vendor.55422cfb17fdcfaf3d31.js.map 8.52 MB 48 [emitted] vendor
static/js/app.ec3ab9add94d0decbc84.js.map 195 kB 49 [emitted] app
static/js/manifest.f5df4bdeb20e097c92f1.js.map 10 kB 50 [emitted] manifest
index.html 1.16 kB [emitted]
static/tinymce4.7.5/langs/zh_CN.js 9.93 kB [emitted]
static/tinymce4.7.5/plugins/codesample/css/prism.css 2.33 kB [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-cry.gif 329 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-cool.gif 354 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-embarassed.gif 331 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-frown.gif 340 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-kiss.gif 338 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-laughing.gif 343 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-money-mouth.gif 321 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-foot-in-mouth.gif 342 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-innocent.gif 336 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-sealed.gif 323 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-surprised.gif 338 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-tongue-out.gif 328 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-undecided.gif 337 bytes [emitted]
static/tinymce4.7.5/plugins/visualblocks/css/visualblocks.css 5.47 kB [emitted]
static/tinymce4.7.5/skins/lightgray/content.min.css 3.75 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff 4.62 kB [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-yell.gif 336 bytes [emitted]
static/tinymce4.7.5/skins/lightgray/content.inline.min.css 3.33 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot 9.49 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.svg 24.7 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf 9.3 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot 18.8 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff 9.38 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce.svg 46 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf 18.6 kB [emitted]
static/tinymce4.7.5/skins/lightgray/img/loader.gif 2.61 kB [emitted]
static/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff 18.7 kB [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-smile.gif 344 bytes [emitted]
static/tinymce4.7.5/skins/lightgray/img/object.gif 152 bytes [emitted]
static/tinymce4.7.5/skins/lightgray/img/trans.gif 43 bytes [emitted]
static/tinymce4.7.5/plugins/emoticons/img/smiley-wink.gif 350 bytes [emitted]
static/tinymce4.7.5/skins/lightgray/skin.min.css 43.3 kB [emitted]
static/tinymce4.7.5/skins/lightgray/img/anchor.gif 53 bytes [emitted]
static/tinymce4.7.5/skins/lightgray/skin.min.css.map 34.6 kB [emitted]
static/tinymce4.7.5/tinymce.min.js 834 kB [emitted] [big]
Build complete.
Tip: built files are meant to be served over an HTTP server.
Opening index.html over file:// won't work.
#打包生成dist目录 移动dist目录
[root@k8s-master-node1 mall-admin-web]# mv dist/ ../
[root@k8s-master-node1 mall-admin-web]# cd ../
第二步构建nginx镜像
shell
#编写dockerfile
[root@k8s-master-node1 mall-swarm]# cat Dockerfile-nginx
FROM centos:centos7.5.1804
MAINTAINER lxf
COPY mall-repo /opt/mall-repo
RUN rm -rf /etc/yum.repos.d/*
COPY local.repo /etc/yum.repos.d/
COPY dist /usr/share/nginx/html/
RUN yum -y install nginx
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
#构建镜像
[root@k8s-master-node1 mall-swarm]# vi Dockerfile-nginx
[root@k8s-master-node1 mall-swarm]# docker build -t mall-nginx:v1.0 -f Dockerfile-nginx .
Sending build context to Docker daemon 3.092GB
Step 1/9 : FROM centos:centos7.5.1804
---> cf49811e3cdb
Step 2/9 : MAINTAINER lxf
---> Using cache
---> d1eb9be73ca0
Step 3/9 : COPY mall-repo /opt/mall-repo
---> e0d559379e00
Step 4/9 : RUN rm -rf /etc/yum.repos.d/*
---> Running in 4a88d71f2e3b
Removing intermediate container 4a88d71f2e3b
---> e26e39e273df
Step 5/9 : COPY local.repo /etc/yum.repos.d/
---> 016314d1cbf7
Step 6/9 : COPY dist /usr/share/nginx/html/
---> ef777b048fed
Step 7/9 : RUN yum -y install nginx
---> Running in 062a3d1aabc7
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.16.1-3.el7 will be installed
--> Processing Dependency: nginx-filesystem = 1:1.16.1-3.el7 for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: nginx-all-modules = 1:1.16.1-3.el7 for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: system-logos for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: redhat-indexhtml for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: openssl for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: nginx-filesystem for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_1)(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libprofiler.so.0()(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: 1:nginx-1.16.1-3.el7.x86_64
--> Running transaction check
---> Package centos-indexhtml.noarch 0:7-9.el7.centos will be installed
---> Package centos-logos.noarch 0:70.0.6-3.el7.centos will be installed
---> Package gperftools-libs.x86_64 0:2.6.1-1.el7 will be installed
---> Package nginx-all-modules.noarch 1:1.16.1-3.el7 will be installed
--> Processing Dependency: nginx-mod-stream = 1:1.16.1-3.el7 for package: 1:nginx-all-modules-1.16.1-3.el7.noarch
--> Processing Dependency: nginx-mod-mail = 1:1.16.1-3.el7 for package: 1:nginx-all-modules-1.16.1-3.el7.noarch
--> Processing Dependency: nginx-mod-http-xslt-filter = 1:1.16.1-3.el7 for package: 1:nginx-all-modules-1.16.1-3.el7.noarch
--> Processing Dependency: nginx-mod-http-perl = 1:1.16.1-3.el7 for package: 1:nginx-all-modules-1.16.1-3.el7.noarch
--> Processing Dependency: nginx-mod-http-image-filter = 1:1.16.1-3.el7 for package: 1:nginx-all-modules-1.16.1-3.el7.noarch
---> Package nginx-filesystem.noarch 1:1.16.1-3.el7 will be installed
---> Package openssl.x86_64 1:1.0.2k-21.el7_9 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.2k-21.el7_9 for package: 1:openssl-1.0.2k-21.el7_9.x86_64
--> Processing Dependency: make for package: 1:openssl-1.0.2k-21.el7_9.x86_64
---> Package openssl11-libs.x86_64 1:1.1.1g-3.el7 will be installed
--> Running transaction check
---> Package make.x86_64 1:3.82-24.el7 will be installed
---> Package nginx-mod-http-image-filter.x86_64 1:1.16.1-3.el7 will be installed
--> Processing Dependency: gd for package: 1:nginx-mod-http-image-filter-1.16.1-3.el7.x86_64
--> Processing Dependency: libgd.so.2()(64bit) for package: 1:nginx-mod-http-image-filter-1.16.1-3.el7.x86_64
---> Package nginx-mod-http-perl.x86_64 1:1.16.1-3.el7 will be installed
--> Processing Dependency: perl >= 5.006001 for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(warnings) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(strict) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(constant) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(XSLoader) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(Exporter) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: perl(:MODULE_COMPAT_5.16.3) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64
---> Package nginx-mod-http-xslt-filter.x86_64 1:1.16.1-3.el7 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64
---> Package nginx-mod-mail.x86_64 1:1.16.1-3.el7 will be installed
---> Package nginx-mod-stream.x86_64 1:1.16.1-3.el7 will be installed
---> Package openssl-libs.x86_64 1:1.0.2k-12.el7 will be updated
---> Package openssl-libs.x86_64 1:1.0.2k-21.el7_9 will be an update
--> Running transaction check
---> Package gd.x86_64 0:2.0.35-27.el7_9 will be installed
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libfreetype.so.6()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libfontconfig.so.1()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: gd-2.0.35-27.el7_9.x86_64
---> Package libxslt.x86_64 0:1.1.28-6.el7 will be installed
---> Package perl.x86_64 4:5.16.3-299.el7_9 will be installed
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Temp) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(File::Path) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-299.el7_9.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-299.el7_9.x86_64
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-libs.x86_64 4:5.16.3-299.el7_9 will be installed
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
---> Package freetype.x86_64 0:2.8-14.el7_9.1 will be installed
---> Package libX11.x86_64 0:1.6.7-3.el7_9 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-3.el7_9 for package: libX11-1.6.7-3.el7_9.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-3.el7_9.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.el7 will be installed
---> Package libjpeg-turbo.x86_64 0:1.2.90-8.el7 will be installed
---> Package libpng.x86_64 2:1.5.13-8.el7 will be installed
---> Package perl-Carp.noarch 0:1.26-244.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-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.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-5.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-macros.x86_64 4:5.16.3-299.el7_9 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
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package libX11-common.noarch 0:1.6.7-3.el7_9 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-299.el7_9 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 dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
---> 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:
nginx x86_64 1:1.16.1-3.el7 local 563 k
Installing for dependencies:
centos-indexhtml noarch 7-9.el7.centos local 92 k
centos-logos noarch 70.0.6-3.el7.centos local 21 M
dejavu-fonts-common noarch 2.33-6.el7 local 64 k
dejavu-sans-fonts noarch 2.33-6.el7 local 1.4 M
fontconfig x86_64 2.13.0-4.3.el7 local 254 k
fontpackages-filesystem noarch 1.44-8.el7 local 9.9 k
freetype x86_64 2.8-14.el7_9.1 local 380 k
gd x86_64 2.0.35-27.el7_9 local 146 k
gperftools-libs x86_64 2.6.1-1.el7 local 272 k
groff-base x86_64 1.22.2-8.el7 local 942 k
libX11 x86_64 1.6.7-3.el7_9 local 607 k
libX11-common noarch 1.6.7-3.el7_9 local 164 k
libXau x86_64 1.0.8-2.1.el7 local 29 k
libXpm x86_64 3.5.12-1.el7 local 55 k
libjpeg-turbo x86_64 1.2.90-8.el7 local 135 k
libpng x86_64 2:1.5.13-8.el7 local 213 k
libxcb x86_64 1.13-1.el7 local 214 k
libxslt x86_64 1.1.28-6.el7 local 242 k
make x86_64 1:3.82-24.el7 local 421 k
nginx-all-modules noarch 1:1.16.1-3.el7 local 20 k
nginx-filesystem noarch 1:1.16.1-3.el7 local 21 k
nginx-mod-http-image-filter x86_64 1:1.16.1-3.el7 local 30 k
nginx-mod-http-perl x86_64 1:1.16.1-3.el7 local 39 k
nginx-mod-http-xslt-filter x86_64 1:1.16.1-3.el7 local 29 k
nginx-mod-mail x86_64 1:1.16.1-3.el7 local 57 k
nginx-mod-stream x86_64 1:1.16.1-3.el7 local 85 k
openssl x86_64 1:1.0.2k-21.el7_9 local 493 k
openssl11-libs x86_64 1:1.1.1g-3.el7 local 1.5 M
perl x86_64 4:5.16.3-299.el7_9 local 8.0 M
perl-Carp noarch 1.26-244.el7 local 19 k
perl-Encode x86_64 2.51-7.el7 local 1.5 M
perl-Exporter noarch 5.68-3.el7 local 28 k
perl-File-Path noarch 2.09-2.el7 local 26 k
perl-File-Temp noarch 0.23.01-3.el7 local 56 k
perl-Filter x86_64 1.49-3.el7 local 76 k
perl-Getopt-Long noarch 2.40-3.el7 local 56 k
perl-HTTP-Tiny noarch 0.033-3.el7 local 38 k
perl-PathTools x86_64 3.40-5.el7 local 82 k
perl-Pod-Escapes noarch 1:1.04-299.el7_9 local 52 k
perl-Pod-Perldoc noarch 3.20-4.el7 local 87 k
perl-Pod-Simple noarch 1:3.28-4.el7 local 216 k
perl-Pod-Usage noarch 1.63-3.el7 local 27 k
perl-Scalar-List-Utils x86_64 1.27-248.el7 local 36 k
perl-Socket x86_64 2.010-5.el7 local 49 k
perl-Storable x86_64 2.45-3.el7 local 77 k
perl-Text-ParseWords noarch 3.29-4.el7 local 14 k
perl-Time-HiRes x86_64 4:1.9725-3.el7 local 45 k
perl-Time-Local noarch 1.2300-2.el7 local 24 k
perl-constant noarch 1.27-2.el7 local 19 k
perl-libs x86_64 4:5.16.3-299.el7_9 local 690 k
perl-macros x86_64 4:5.16.3-299.el7_9 local 44 k
perl-parent noarch 1:0.225-244.el7 local 12 k
perl-podlators noarch 2.5.1-3.el7 local 112 k
perl-threads x86_64 1.87-4.el7 local 49 k
perl-threads-shared x86_64 1.43-6.el7 local 39 k
Updating for dependencies:
openssl-libs x86_64 1:1.0.2k-21.el7_9 local 1.2 M
Transaction Summary
================================================================================
Install 1 Package (+55 Dependent packages)
Upgrade ( 1 Dependent package)
Total download size: 42 M
Downloading packages:
--------------------------------------------------------------------------------
Total 768 MB/s | 42 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:libpng-1.5.13-8.el7.x86_64 1/58
Installing : freetype-2.8-14.el7_9.1.x86_64 2/58
Installing : fontpackages-filesystem-1.44-8.el7.noarch 3/58
Installing : dejavu-fonts-common-2.33-6.el7.noarch 4/58
Installing : dejavu-sans-fonts-2.33-6.el7.noarch 5/58
Installing : fontconfig-2.13.0-4.3.el7.x86_64 6/58
Installing : libXau-1.0.8-2.1.el7.x86_64 7/58
Installing : libxcb-1.13-1.el7.x86_64 8/58
Installing : 1:openssl11-libs-1.1.1g-3.el7.x86_64 9/58
Installing : 1:nginx-filesystem-1.16.1-3.el7.noarch 10/58
Installing : libxslt-1.1.28-6.el7.x86_64 11/58
Updating : 1:openssl-libs-1.0.2k-21.el7_9.x86_64 12/58
Installing : libX11-common-1.6.7-3.el7_9.noarch 13/58
Installing : libX11-1.6.7-3.el7_9.x86_64 14/58
Installing : libXpm-3.5.12-1.el7.x86_64 15/58
Installing : libjpeg-turbo-1.2.90-8.el7.x86_64 16/58
Installing : gd-2.0.35-27.el7_9.x86_64 17/58
Installing : 1:make-3.82-24.el7.x86_64 18/58
Installing : 1:openssl-1.0.2k-21.el7_9.x86_64 19/58
Installing : centos-indexhtml-7-9.el7.centos.noarch 20/58
Installing : centos-logos-70.0.6-3.el7.centos.noarch 21/58
Installing : groff-base-1.22.2-8.el7.x86_64 22/58
Installing : 1:perl-parent-0.225-244.el7.noarch 23/58
Installing : perl-HTTP-Tiny-0.033-3.el7.noarch 24/58
Installing : perl-podlators-2.5.1-3.el7.noarch 25/58
Installing : perl-Pod-Perldoc-3.20-4.el7.noarch 26/58
Installing : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 27/58
Installing : perl-Encode-2.51-7.el7.x86_64 28/58
Installing : perl-Text-ParseWords-3.29-4.el7.noarch 29/58
Installing : perl-Pod-Usage-1.63-3.el7.noarch 30/58
Installing : perl-threads-1.87-4.el7.x86_64 31/58
Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 32/58
Installing : perl-Exporter-5.68-3.el7.noarch 33/58
Installing : perl-constant-1.27-2.el7.noarch 34/58
Installing : perl-Socket-2.010-5.el7.x86_64 35/58
Installing : perl-Filter-1.49-3.el7.x86_64 36/58
Installing : perl-Time-Local-1.2300-2.el7.noarch 37/58
Installing : perl-Carp-1.26-244.el7.noarch 38/58
Installing : 4:perl-macros-5.16.3-299.el7_9.x86_64 39/58
Installing : perl-Storable-2.45-3.el7.x86_64 40/58
Installing : perl-PathTools-3.40-5.el7.x86_64 41/58
Installing : perl-threads-shared-1.43-6.el7.x86_64 42/58
Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64 43/58
Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch 44/58
Installing : perl-File-Temp-0.23.01-3.el7.noarch 45/58
Installing : perl-File-Path-2.09-2.el7.noarch 46/58
Installing : 4:perl-libs-5.16.3-299.el7_9.x86_64 47/58
Installing : perl-Getopt-Long-2.40-3.el7.noarch 48/58
Installing : 4:perl-5.16.3-299.el7_9.x86_64 49/58
Installing : gperftools-libs-2.6.1-1.el7.x86_64 50/58
Installing : 1:nginx-mod-mail-1.16.1-3.el7.x86_64 51/58
Installing : 1:nginx-mod-stream-1.16.1-3.el7.x86_64 52/58
Installing : 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64 53/58
Installing : 1:nginx-mod-http-image-filter-1.16.1-3.el7.x86_64 54/58
Installing : 1:nginx-1.16.1-3.el7.x86_64 55/58
Installing : 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64 56/58
Installing : 1:nginx-all-modules-1.16.1-3.el7.noarch 57/58
Cleanup : 1:openssl-libs-1.0.2k-12.el7.x86_64 58/58
Verifying : perl-HTTP-Tiny-0.033-3.el7.noarch 1/58
Verifying : fontconfig-2.13.0-4.3.el7.x86_64 2/58
Verifying : 1:nginx-mod-mail-1.16.1-3.el7.x86_64 3/58
Verifying : 4:perl-Time-HiRes-1.9725-3.el7.x86_64 4/58
Verifying : perl-threads-1.87-4.el7.x86_64 5/58
Verifying : perl-Exporter-5.68-3.el7.noarch 6/58
Verifying : perl-constant-1.27-2.el7.noarch 7/58
Verifying : perl-PathTools-3.40-5.el7.x86_64 8/58
Verifying : gperftools-libs-2.6.1-1.el7.x86_64 9/58
Verifying : perl-Socket-2.010-5.el7.x86_64 10/58
Verifying : groff-base-1.22.2-8.el7.x86_64 11/58
Verifying : centos-logos-70.0.6-3.el7.centos.noarch 12/58
Verifying : 1:perl-parent-0.225-244.el7.noarch 13/58
Verifying : 1:nginx-mod-stream-1.16.1-3.el7.x86_64 14/58
Verifying : centos-indexhtml-7-9.el7.centos.noarch 15/58
Verifying : perl-Filter-1.49-3.el7.x86_64 16/58
Verifying : perl-File-Temp-0.23.01-3.el7.noarch 17/58
Verifying : 1:perl-Pod-Simple-3.28-4.el7.noarch 18/58
Verifying : 1:nginx-mod-http-perl-1.16.1-3.el7.x86_64 19/58
Verifying : perl-Time-Local-1.2300-2.el7.noarch 20/58
Verifying : fontpackages-filesystem-1.44-8.el7.noarch 21/58
Verifying : 1:make-3.82-24.el7.x86_64 22/58
Verifying : 1:perl-Pod-Escapes-1.04-299.el7_9.noarch 23/58
Verifying : perl-Pod-Perldoc-3.20-4.el7.noarch 24/58
Verifying : 1:openssl-1.0.2k-21.el7_9.x86_64 25/58
Verifying : libXpm-3.5.12-1.el7.x86_64 26/58
Verifying : libjpeg-turbo-1.2.90-8.el7.x86_64 27/58
Verifying : perl-Carp-1.26-244.el7.noarch 28/58
Verifying : libxcb-1.13-1.el7.x86_64 29/58
Verifying : perl-threads-shared-1.43-6.el7.x86_64 30/58
Verifying : libX11-common-1.6.7-3.el7_9.noarch 31/58
Verifying : libX11-1.6.7-3.el7_9.x86_64 32/58
Verifying : 4:perl-macros-5.16.3-299.el7_9.x86_64 33/58
Verifying : perl-Storable-2.45-3.el7.x86_64 34/58
Verifying : 1:nginx-mod-http-xslt-filter-1.16.1-3.el7.x86_64 35/58
Verifying : dejavu-sans-fonts-2.33-6.el7.noarch 36/58
Verifying : perl-Scalar-List-Utils-1.27-248.el7.x86_64 37/58
Verifying : 2:libpng-1.5.13-8.el7.x86_64 38/58
Verifying : gd-2.0.35-27.el7_9.x86_64 39/58
Verifying : 1:openssl-libs-1.0.2k-21.el7_9.x86_64 40/58
Verifying : freetype-2.8-14.el7_9.1.x86_64 41/58
Verifying : perl-Encode-2.51-7.el7.x86_64 42/58
Verifying : perl-Pod-Usage-1.63-3.el7.noarch 43/58
Verifying : dejavu-fonts-common-2.33-6.el7.noarch 44/58
Verifying : perl-podlators-2.5.1-3.el7.noarch 45/58
Verifying : 4:perl-5.16.3-299.el7_9.x86_64 46/58
Verifying : perl-File-Path-2.09-2.el7.noarch 47/58
Verifying : libxslt-1.1.28-6.el7.x86_64 48/58
Verifying : 1:nginx-filesystem-1.16.1-3.el7.noarch 49/58
Verifying : 1:nginx-1.16.1-3.el7.x86_64 50/58
Verifying : 1:openssl11-libs-1.1.1g-3.el7.x86_64 51/58
Verifying : libXau-1.0.8-2.1.el7.x86_64 52/58
Verifying : 1:nginx-all-modules-1.16.1-3.el7.noarch 53/58
Verifying : perl-Getopt-Long-2.40-3.el7.noarch 54/58
Verifying : perl-Text-ParseWords-3.29-4.el7.noarch 55/58
Verifying : 1:nginx-mod-http-image-filter-1.16.1-3.el7.x86_64 56/58
Verifying : 4:perl-libs-5.16.3-299.el7_9.x86_64 57/58
Verifying : 1:openssl-libs-1.0.2k-12.el7.x86_64 58/58
Installed:
nginx.x86_64 1:1.16.1-3.el7
Dependency Installed:
centos-indexhtml.noarch 0:7-9.el7.centos
centos-logos.noarch 0:70.0.6-3.el7.centos
dejavu-fonts-common.noarch 0:2.33-6.el7
dejavu-sans-fonts.noarch 0:2.33-6.el7
fontconfig.x86_64 0:2.13.0-4.3.el7
fontpackages-filesystem.noarch 0:1.44-8.el7
freetype.x86_64 0:2.8-14.el7_9.1
gd.x86_64 0:2.0.35-27.el7_9
gperftools-libs.x86_64 0:2.6.1-1.el7
groff-base.x86_64 0:1.22.2-8.el7
libX11.x86_64 0:1.6.7-3.el7_9
libX11-common.noarch 0:1.6.7-3.el7_9
libXau.x86_64 0:1.0.8-2.1.el7
libXpm.x86_64 0:3.5.12-1.el7
libjpeg-turbo.x86_64 0:1.2.90-8.el7
libpng.x86_64 2:1.5.13-8.el7
libxcb.x86_64 0:1.13-1.el7
libxslt.x86_64 0:1.1.28-6.el7
make.x86_64 1:3.82-24.el7
nginx-all-modules.noarch 1:1.16.1-3.el7
nginx-filesystem.noarch 1:1.16.1-3.el7
nginx-mod-http-image-filter.x86_64 1:1.16.1-3.el7
nginx-mod-http-perl.x86_64 1:1.16.1-3.el7
nginx-mod-http-xslt-filter.x86_64 1:1.16.1-3.el7
nginx-mod-mail.x86_64 1:1.16.1-3.el7
nginx-mod-stream.x86_64 1:1.16.1-3.el7
openssl.x86_64 1:1.0.2k-21.el7_9
openssl11-libs.x86_64 1:1.1.1g-3.el7
perl.x86_64 4:5.16.3-299.el7_9
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-3.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-299.el7_9
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-5.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-299.el7_9
perl-macros.x86_64 4:5.16.3-299.el7_9
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
Dependency Updated:
openssl-libs.x86_64 1:1.0.2k-21.el7_9
Complete!
Removing intermediate container 062a3d1aabc7
---> 94326917ff39
Step 8/9 : EXPOSE 80
---> Running in 8a94b64c903e
Removing intermediate container 8a94b64c903e
---> d8f0e3231f8a
Step 9/9 : CMD ["nginx","-g","daemon off;"]
---> Running in b6dead28bfc4
Removing intermediate container b6dead28bfc4
---> 8ba055d2050a
Successfully built 8ba055d2050a
Successfully tagged mall-nginx:v1.0
[root@k8s-master-node1 mall-swarm]# docker images | grep mall
mall-redis v1.0 7b94474d1bd3 5 minutes ago 338MB
mall-nginx v1.0 8ba055d2050a 15 minutes ago 434MB
mall-nacos v1.0 962942fa6541 54 minutes ago 733MB
mall-rabbit v1.0 0edb48e232b3 About an hour ago 374MB
mall-mysql v1.0 2792bb686378 2 hours ago 522MB
第七步 编排部署mall-Swarm
导入镜像
shell
[root@k8s-master-node1 mall-swarm]# docker load -i images/mall_mall-
mall_mall-admin_1.0-SNAPSHOT.tar mall_mall-auth_1.0-SNAPSHOT.tar mall_mall-gateway_1.0-SNAPSHOT.tar
[root@k8s-master-node1 mall-swarm]# docker load -i images/mall_mall-admin_1.0-SNAPSHOT.tar
a2ae92ffcd29: Loading layer [==================================================>] 128.9MB/128.9MB
0eb22bfb707d: Loading layer [==================================================>] 45.18MB/45.18MB
30339f20ced0: Loading layer [==================================================>] 126.6MB/126.6MB
ce6c8756685b: Loading layer [==================================================>] 1.404MB/1.404MB
a3483ce177ce: Loading layer [==================================================>] 3.584kB/3.584kB
6ed1a81ba5b6: Loading layer [==================================================>] 3.584kB/3.584kB
c3fe59dd9556: Loading layer [==================================================>] 356.7MB/356.7MB
35c20f26d188: Loading layer [==================================================>] 426kB/426kB
c8a81be1592b: Loading layer [==================================================>] 72.12MB/72.12MB
Loaded image: mall/mall-admin:1.0-SNAPSHOT
[root@k8s-master-node1 mall-swarm]# docker load -i images/mall_mall-auth_1.0-SNAPSHOT.tar
3dfdd4e9619f: Loading layer [==================================================>] 55.39MB/55.39MB
Loaded image: mall/mall-auth:1.0-SNAPSHOT
[root@k8s-master-node1 mall-swarm]# docker load -i images/mall_mall-gateway_1.0-SNAPSHOT.tar
340e50877635: Loading layer [==================================================>] 64.53MB/64.53MB
Loaded image: mall/mall-gateway:1.0-SNAPSHOT
[root@k8s-master-node1 mall-swarm]#
编写docker-compose.yaml
shell
cat > docker-compose.yaml << lxf
version: '3'
services:
mysql:
image: mall-mysql:v1.0
container_name: mysql
restart: always
ports:
- 3306:3306
redis:
image: mall-redis:v1.0
container_name: redis
ports:
- 6379:6379
nginx:
image: mall-nginx:v1.0
container_name: nginx
ports:
- 8888:80
rabbitmq:
image: mall-rabbit:v1.0
container_name: rabbitmq
ports:
- 5672:5672
- 15672:15672
nacos-registry:
image: mall-nacos:v1.0
container_name: nacos-registry
ports:
- 8848:8848
mall-admin:
image: mall/mall-admin:1.0-SNAPSHOT
container_name: mall-admin
ports:
- 8080:8080
links:
- mysql:db
mall-gateway:
image: mall/mall-gateway:1.0-SNAPSHOT
container_name: mall-gateway
ports:
- 8201:8201
links:
- redis:redis
- nacos-registry:nacos-registry
mall-auth:
image: mall/mall-auth:1.0-SNAPSHOT
container_name: mall-auth
ports:
- 8401:8401
links:
- nacos-registry:nacos-registry
lxf
启动编排
shell
[root@k8s-master-node1 mall-swarm]# cd /opt/harbor/
[root@k8s-master-node1 harbor]# docker-compose down
[root@k8s-master-node1 harbor]#cd -
[root@k8s-master-node1 mall-swarm]# docker-compose up -d
[+] Running 9/9
? Network mall-swarm_default Created 0.0s
? Container nacos-registry Started 1.4s
? Container nginx Started 1.3s
? Container redis Started 1.0s
? Container rabbitmq Started 1.3s
? Container mysql Started 1.2s
? Container mall-auth Started 2.2s
? Container mall-gateway Started 2.1s
? Container mall-admin Started 1.7s
[root@k8s-master-node1 mall-swarm]# docker-compose ps
NAME COMMAND SERVICE STATUS PORTS
mall-admin "java -jar -Dspring...." mall-admin running 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp
mall-auth "java -jar -Dspring...." mall-auth running 0.0.0.0:8401->8401/tcp, :::8401->8401/tcp
mall-gateway "java -jar -Dspring...." mall-gateway running 0.0.0.0:8201->8201/tcp, :::8201->8201/tcp
mysql "mysqld_safe --user=..." mysql running 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp
nacos-registry "/bin/bash /opt/naco..." nacos-registry running 0.0.0.0:8848->8848/tcp, :::8848->8848/tcp
nginx "nginx -g 'daemon of..." nginx running 0.0.0.0:8888->80/tcp, :::8888->80/tcp
rabbitmq "/bin/bash /opt/rabb..." rabbitmq running 0.0.0.0:5672->5672/tcp, 0.0.0.0:15672->15672/tcp, :::5672->5672/tcp, :::15672->15672/tcp
redis "/usr/bin/redis-serv..." redis running 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp
[root@k8s-master-node1 mall-swarm]#
访问 ip:8888
大功告成