1 [base] 2 name=CentOS-$releasever - Base 3 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
4 #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
5 gpgcheck=1
6 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
7
8 #released updates 9 [updates] 10 name=CentOS-$releasever - Updates 11 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
12 #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
13 gpgcheck=1
14 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
15
16 #additional packages that may be useful 17 [extras] 18 name=CentOS-$releasever - Extras 19 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
20 #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
21 gpgcheck=1
22 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
23
24 #additional packages that extend functionality of existing packages 25 [centosplus] 26 name=CentOS-$releasever - Plus 27 mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
28 #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
29 gpgcheck=1
30 enabled=0
31 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
1 [root@foryou ~]# ls /var/cache/yum/x86_64/7/extras/packages/
2 container-selinux-2.66-1.el7.noarch.rpm oci-register-machine-0-6.git2b44233.el7.x86_64.rpm 3 container-storage-setup-0.10.0-1.gitdf0dcd5.el7.noarch.rpm oci-systemd-hook-0.1.16-1.git05bd9a0.el7.x86_64.rpm 4 docker-1.13.1-68.gitdded712.el7.centos.x86_64.rpm oci-umount-2.3.3-3.gite3c9055.el7.x86_64.rpm 5 docker-client-1.13.1-68.gitdded712.el7.centos.x86_64.rpm skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64.rpm 6 docker-common-1.13.1-68.gitdded712.el7.centos.x86_64.rpm 7 [root@foryou ~]# ls /var/cache/yum/x86_64/7/extras/packages/ | wc -l 8 9
1 [root@foryou ~]# vim /etc/sysctl.conf #在文件最後添加,以一下紅色標記內容 2 net.ipv4.ip_forward = 1
3 [root@foryou ~]# sysctl -p #使用配置生效 4 net.ipv4.ip_forward = 1
5 [root@foryou ~]# /etc/init.d/network restart # 重啓網絡使其生效 6 Restarting network (via systemctl): [ OK ] 7 [root@foryou ~]# cat /proc/sys/net/ipv4/ip_forward #查看 8 1
1 [root@foryou ~]# systemctl start docker # 啓動docker服務 2 [root@foryou ~]# systemctl enable docker # 設置開機啓動docker服務 3 Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. 4 [root@foryou ~]# docker version # 顯示docker版本信息
1 [root@foryou ~]# docker info 2 Containers: 0
3 Running: 0
4 Paused: 0
5 Stopped: 0
6 Images: 0
7 Server Version: 1.13.1
8 Storage Driver: overlay2 9 Backing Filesystem: xfs # 文件系統爲xfs 10 Supports d_type: true
11 Native Overlay Diff: true
12 Logging Driver: journald 13 Cgroup Driver: systemd 14 Plugins: 15 Volume: local 16 Network: bridge host macvlan null overlay 17 Swarm: inactive 18 Runtimes: docker-runc runc 19 Default Runtime: docker-runc 20 Init Binary: /usr/libexec/docker/docker-init-current 21 containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1) 22 runc version: 5eda6f6fd0c2884c2c8e78a6e7119e8d0ecedb77 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f) 23 init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574) 24 Security Options: 25 seccomp 26 WARNING: You're not using the default seccomp profile
27 Profile: /etc/docker/seccomp.json 28 selinux 29 Kernel Version: 3.10.0-693.el7.x86_64 30 Operating System: CentOS Linux 7 (Core) 31 OSType: linux 32 Architecture: x86_64 33 Number of Docker Hooks: 3
34 CPUs: 1
35 Total Memory: 976.3 MiB 36 Name: foryou 37 ID: PDBR:ERBZ:UNRZ:Y7K7:6KIJ:42WU:SXPE:3CBU:CKYV:UFRA:636A:3FBJ 38 Docker Root Dir: /var/lib/docker 39 Debug Mode (client): false
40 Debug Mode (server): false
41 Registry: https://index.docker.io/v1/
42 Experimental: false
43 Insecure Registries: 44 127.0.0.0/8
45 Live Restore Enabled: false
46 Registries: docker.io (secure)
1 [root@foryou ~]# docker search centos #從 Docker Hub 中搜索符合條件的鏡像。 2 INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED 3 docker.io docker.io/centos The official build of CentOS. 4529 [OK] 4 docker.io docker.io/ansible/centos7-ansible Ansible on Centos7 114 [OK] 5 docker.io docker.io/jdeathe/centos-ssh CentOS-6 6.9 x86_64 / CentOS-7 7.4.1708 x8... 98 [OK] 6 docker.io docker.io/consol/centos-xfce-vnc Centos container with "headless" VNC sessi... 58 [OK] 7 docker.io docker.io/imagine10255/centos6-lnmp-php56 centos6-lnmp-php56 44 [OK] 8 docker.io docker.io/tutum/centos Simple CentOS docker image with SSH access 43
9 docker.io docker.io/centos/mysql-57-centos7 MySQL 5.7 SQL database server 35
10 docker.io docker.io/gluster/gluster-centos Official GlusterFS Image [ CentOS-7 + Glu... 31 [OK] 11 docker.io docker.io/openshift/base-centos7 A Centos7 derived base image for Source-To... 30
12 docker.io docker.io/centos/python-35-centos7 Platform for building and running Python 3... 27
13 docker.io docker.io/centos/postgresql-96-centos7 PostgreSQL is an advanced Object-Relationa... 24
14 docker.io docker.io/kinogmt/centos-ssh CentOS with SSH 21 [OK] 15 docker.io docker.io/openshift/jenkins-2-centos7 A Centos7 based Jenkins v2.x image for use... 14
16 docker.io docker.io/centos/httpd-24-centos7 Platform for running Apache httpd 2.4 or b... 13
17 docker.io docker.io/openshift/mysql-55-centos7 DEPRECATED: A Centos7 based MySQL v5.5 ima... 6
18 docker.io docker.io/pivotaldata/centos-gpdb-dev CentOS image for GPDB development. Tag nam... 6
19 docker.io docker.io/openshift/jenkins-1-centos7 DEPRECATED: A Centos7 based Jenkins v1.x i... 4
20 docker.io docker.io/darksheer/centos Base Centos Image -- Updated hourly 3 [OK] 21 docker.io docker.io/openshift/wildfly-101-centos7 A Centos7 based WildFly v10.1 image for us... 3
22 docker.io docker.io/pivotaldata/centos Base centos, freshened up a little with a ... 2
23 docker.io docker.io/blacklabelops/centos CentOS Base Image! Built and Updates Daily! 1 [OK] 24 docker.io docker.io/pivotaldata/centos-mingw Using the mingw toolchain to cross-compile... 1
25 docker.io docker.io/jameseckersall/sonarr-centos Sonarr on CentOS 7 0 [OK] 26 docker.io docker.io/pivotaldata/centos-gcc-toolchain CentOS with a toolchain, but unaffiliated ... 0
27 docker.io docker.io/smartentry/centos centos with smartentry 0 [OK] 28 [root@foryou ~]#
1 [root@foryou ~]# docker pull centos 2 Using default tag: latest 3 Trying to pull repository docker.io/library/centos ... 4 latest: Pulling from docker.io/library/centos 5 7dc0dca2b151: Pull complete 6 Digest: sha256:b67d21dfe609ddacf404589e04631d90a342921e81c40aeaf3391f6717fa5322 7 Status: Downloaded newer image for docker.io/centos:latest
1 [root@foryou ~]# vim /etc/docker/daemon.json # 修改如下內容: 2 改{}: 3 爲: 4 { 5 'registry-mirrors':['https://docker.mirrors.ustc.deu.cn'] 6 }
1 [root@foryou ~]# docker load -i /root/centos-latest-docker-image.tar
1 [root@foryou ~]# docker images 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB
1 [root@foryou ~]# du -sh /var/lib/docker/*
2 0 /var/lib/docker/containers 3 652K /var/lib/docker/image 4 32K /var/lib/docker/network 5 208M /var/lib/docker/overlay2 6 0 /var/lib/docker/plugins 7 0 /var/lib/docker/swarm 8 0 /var/lib/docker/tmp 9 0 /var/lib/docker/trust 10 24K /var/lib/docker/volumes
1 [root@foryou overlay2]# docker images # 查看鏡像 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB 4 [root@foryou overlay2]# docker run -it docker.io/centos:latest /bin/bash 5 [root@5c28682aa834 /]# ls # 查看實例環境 6 bin dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
7 [root@5c28682aa834 /]# cat /etc/centos-release 8 CentOS Linux release 7.5.1804 (Core) 9 [root@5c28682aa834 /]# exit # 注意:退出容器 10 exit 11 [root@foryou overlay2]#
1 [root@foryou overlay2]# JOB=$(docker run -d docker.io/centos:latest /bin/bash -c "while true;do echo foryouzxl;sleep 1;done") 2 [root@foryou overlay2]# echo $JOB # 變量IOB中存放着Name/ID 3 4b5068f11f3e2626506deb2c414bf37a3d2261961081ac536f31ef0ffc58f608
1 [root@foryou overlay2]# docker logs 4b5068f11f 2 foryouzxl 3 foryouzxl 4 foryouzxl 5 ……
1 [root@foryou overlay2]# docker ps #列出全部運行中容器。 2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 4 minutes ago Up 4 minutes dreamy_tesla 4 [root@foryou overlay2]# docker ps -a # -a 列出全部容器(包含沉睡/退出狀態的容器); 5 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 5 minutes ago Up 5 minutes dreamy_tesla 7 5c28682aa834 docker.io/centos:latest "/bin/bash" 11 minutes ago Exited (0) 11 minutes ago laughing_fermi 8 [root@foryou overlay2]#
1 root@foryou overlay2]# docker logs dreamy_tesla 2 或者 3 [root@foryou overlay2]# docker logs 4b5068f11f
1 [root@foryou overlay2]# docker ps -a 2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 9 minutes ago Up 9 minutes dreamy_tesla 4 5c28682aa834 docker.io/centos:latest "/bin/bash" 16 minutes ago Exited (0) 16 minutes ago laughing_fermi
1 [root@foryou overlay2]# docker kill 4b5068f11f3e 2 4b5068f11f3e 3 或者 4 [root@foryou overlay2]# docker kill $JOB
1 [root@foryou overlay2]# docker ps -a 2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 12 minutes ago Exited (137) About a minute ago dreamy_tesla 4 5c28682aa834 docker.io/centos:latest "/bin/bash" 19 minutes ago Exited (0) 19 minutes ago laughing_fermi
1 # 啓動一個實例 啓動:run #建立並運行docker實例 2 [root@foryou overlay2]# JOB=$(docker run -d docker.io/centos:latest /bin/bash -c "while true;do echo lovezxl;sleep 1;done") 3 [root@foryou overlay2]# echo $JOB 4 c40ed75378a89b79d9bf5418ef799b22c76c2ec46a1fff4bda84a7d56ce2d97e 5 [root@foryou overlay2]# docker ps 6 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7 c40ed75378a8 docker.io/centos:latest "/bin/bash -c 'whi..." 18 seconds ago Up 18 seconds xenodochial_varahamihira 8 [root@foryou overlay2]# docker stop c40ed75378a8 # 中止一個實例 9 c40ed75378a8 10 [root@foryou overlay2]# docker ps -a 11 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 12 c40ed75378a8 docker.io/centos:latest "/bin/bash -c 'whi..." About a minute ago Exited (137) 7 seconds ago xenodochial_varahamihira 13 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 16 minutes ago Exited (137) 5 minutes ago dreamy_tesla 14 5c28682aa834 docker.io/centos:latest "/bin/bash" 23 minutes ago Exited (0) 22 minutes ago laughing_fermi 15 [root@foryou overlay2]# docker start c40ed75378a8 # 啓動一個實例 16 c40ed75378a8 17 [root@foryou overlay2]# docker ps -a 18 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 19 c40ed75378a8 docker.io/centos:latest "/bin/bash -c 'whi..." About a minute ago Up 3 seconds xenodochial_varahamihira 20 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 17 minutes ago Exited (137) 5 minutes ago dreamy_tesla 21 5c28682aa834 docker.io/centos:latest "/bin/bash" 23 minutes ago Exited (0) 23 minutes ago laughing_fermi 22 [root@foryou overlay2]# docker restart c40ed75378a8 # 重啓一個實例 23 c40ed75378a8 24 [root@foryou overlay2]# docker ps -a 25 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 26 c40ed75378a8 docker.io/centos:latest "/bin/bash -c 'whi..." 2 minutes ago Up 4 seconds xenodochial_varahamihira 27 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 17 minutes ago Exited (137) 6 minutes ago dreamy_tesla 28 5c28682aa834 docker.io/centos:latest "/bin/bash" 24 minutes ago Exited (0) 23 minutes ago laughing_fermi
1 [root@foryou overlay2]# docker rm -f c40ed75378a8 2 c40ed75378a8 3 [root@foryou overlay2]# docker ps -a 4 CONTAINER ID IMAGE COMMAND CREATED STATUS 5 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 22 minutes ago Exited (137) 10 mi 6 5c28682aa834 docker.io/centos:latest "/bin/bash" 28 minutes ago Exited (0) 28 minu
1 [root@foryou overlay2]# docker run -it centos /bin/bash 2 [root@cd65e6d76036 /]# yum -y install httpd #在 container 中安裝 apache 軟件包 3 …… 4 Complete!
1 [root@foryou overlay2]# docker images 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB
1 [root@foryou overlay2]# docker ps -a 2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3 cd65e6d76036 centos "/bin/bash" 4 minutes ago Exited (0) About a minute ago wizardly_davinci 4 4b5068f11f3e docker.io/centos:latest "/bin/bash -c 'whi..." 35 minutes ago Exited (137) 24 minutes ago dreamy_tesla 5 5c28682aa834 docker.io/centos:latest "/bin/bash" 42 minutes ago Exited (0) 41 minutes ago laughing_fermi 6 [root@foryou overlay2]# docker commit cd65e6d76036 centos:apache 7 sha256:7ca4fb9d37b045798f635056adb08c38cffed250a8ed2554e7eca5f9b52c0dc0 8 [root@foryou overlay2]# docker images 9 REPOSITORY TAG IMAGE ID CREATED SIZE 10 centos apache 7ca4fb9d37b0 19 seconds ago 319 MB 11 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB
1 [root@foryou overlay2]# docker run -it centos:apache /bin/bash 2 [root@2d7f99899a9f /]# rpm -qa httpd #已經安裝好 apache命令 3 httpd-2.4.6-80.el7.centos.1.x86_64 4 [root@2d7f99899a9f /]# 5 注:說明基於 apache鏡像的容器建立成功。
1 [root@2d7f99899a9f /]# mkdir /docker-build 2 [root@2d7f99899a9f /]# cd !$ 3 cd /docker-build 4 [root@2d7f99899a9f docker-build]# touch Dockerfile 5 [root@2d7f99899a9f docker-build]# 6 注: make 自動化編譯時須要 Makefile 文件,自動化建立 docker 鏡像時,須要 Dockerfile
1 [root@2d7f99899a9f docker-build]# vi Dockerfile 2 FROM centos 3 MAINTAINER <hg@foryou.com>
4 RUN yum -y install httpd 5 ADD start.sh /usr/local/bin/start.sh 6 ADD index.html /var/www/html/index.html
1 [root@2d7f99899a9f docker-build]# echo "/usr/sbin/httpd -DFORCEGROUND" > start.sh 2 [root@2d7f99899a9f docker-build]# ls 3 Dockerfile start.sh 4 [root@2d7f99899a9f docker-build]# chmod a+x start.sh 5 注:/usr/sbin/httpd -DFOREGROUND 至關於執行了 systemctl start httpd 6 建立 index.html 7 [root@2d7f99899a9f docker-build]# echo "docker image build test" > index.html 8 [root@2d7f99899a9f docker-build]# ls 9 Dockerfile index.html start.sh 10 [root@2d7f99899a9f docker-build]# chmod a+x index.html 11 [root@2d7f99899a9f docker-build]#
1 [root@foryou docker-build]# docker build -t centos:httpd ./
2 Sending build context to Docker daemon 4.096 kB 3 Step 1/5 : FROM centos 4 ---> 49f7960eb7e4 5 Step 2/5 : MAINTAINER <hg@foryou.com>
6 ---> Running in fde5a706d822 7 ---> e1a79980083b 8 Removing intermediate container fde5a706d822 9 Step 3/5 : RUN yum -y install httpd 10 ---> Running in e50882f46945 11 ---> e6ad6ba7471a 12 Removing intermediate container e50882f46945 13 Step 4/5 : ADD start.sh /usr/local/bin/start.sh 14 ---> ae384e75f303 15 Removing intermediate container c340a156939f 16 Step 5/5 : ADD index.html /var/www/html/index.html 17 ---> 98af80c193da 18 Removing intermediate container fde9a4c41a2c 19 Successfully built 98af80c193da 20 [root@foryou docker-build]#
1 [root@foryou ~]# docker images 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 centos httpd 98af80c193da About a minute ago 319 MB 4 centos apache 7ca4fb9d37b0 43 minutes ago 319 MB 5 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB 6 注:docker 鏡像=應用/程序+庫
1 [root@foryou docker-build]# docker save -o centos7.4-httpd-docker-image.tar centos:httpd 2 [root@foryou docker-build]# ls # 查看導出成功 3 centos7.4-httpd-docker-image.tar Dockerfile index.html start.sh
1 [root@foryou docker-build]# docker images #查看目前存在的鏡像爲3個 2 REPOSITORY TAG IMAGE ID CREATED SIZE 3 centos httpd 98af80c193da 14 minutes ago 319 MB 4 centos apache 7ca4fb9d37b0 56 minutes ago 319 MB 5 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB 6 [root@foryou docker-build]# docker rmi centos:httpd # 先刪除本地docker鏡像,再導入: 7 Untagged: centos:httpd 8 Deleted: sha256:98af80c193da2361e45e1009aa258c7b88d0f4e508257825d0cec058c58f3357 9 Deleted: sha256:6f60d1fb621514bfb0996de921b6f4be58b5c6b1bf2d4f5bc1fd9c87da57b7b6 10 Deleted: sha256:ae384e75f303e82332d6fad55ea3e92377c0ecf4b3fbedaac55866683200660e 11 Deleted: sha256:b2bf86c2aba2e34cb4d9024af24e292695a2a3b54f641ce0113f3a5b199ecf94 12 Deleted: sha256:e6ad6ba7471a1e2621d1d7a42726dc024f2570fb9a7ff1e3c79dc3bf7750dfeb 13 Deleted: sha256:cb8e35f16eb44743ae67862df17775579ef12dd73e1e1945f9096b180aa11377 14 Deleted: sha256:e1a79980083b62c6b82cfd1723ad159dbbee9a5ed82efb59b8b5c4a60734a839 15 [root@foryou docker-build]# docker images 16 REPOSITORY TAG IMAGE ID CREATED SIZE 17 centos apache 7ca4fb9d37b0 56 minutes ago 319 MB 18 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB 19 [root@foryou docker-build]# docker load -i centos7.4-httpd-docker-image.tar 20 20d32b6c5508: Loading layer 120.3 MB/120.3 MB 21 d0cc030e6789: Loading layer 3.584 kB/3.584 kB 22 6799305b3e81: Loading layer 3.584 kB/3.584 kB 23 Loaded image: centos:httpd 24 [root@foryou docker-build]# docker images 25 REPOSITORY TAG IMAGE ID CREATED SIZE 26 centos httpd 98af80c193da 15 minutes ago 319 MB 27 centos apache 7ca4fb9d37b0 57 minutes ago 319 MB 28 docker.io/centos latest 49f7960eb7e4 2 months ago 200 MB
1 [root@foryou docker-build]# docker run -d -p 9000:80 centos:httpd /bin/bash -c /usr/local/bin/start.sh 2 8ad27fc50c16b84f51739b7f467c94555343f793409605188819c6ddf81edd48 3 注: -p 9000:80 把容器中的 80 端口映射到物理機上的 9000 端口
1 [root@foryou docker-build]# docker run -it centos /bin/bash 2 [root@7a04ac0dcac7 /]# yum install net-tools -y 3 [root@7a04ac0dcac7 /]# ifconfig 4 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
5 inet 172.17.0.2 netmask 255.255.0.0 broadcast 0.0.0.0
1 [root@foryou ~]# ifconfig 2 docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 # 注:至關於虛擬機的 NAT 網絡模式 3 inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
4 inet6 fe80::42:75ff:fed2:5eb6 prefixlen 64 scopeid 0x20<link>
5 ether 02:42:75:d2:5e:b6 txqueuelen 0 (Ethernet) 6 RX packets 25519 bytes 1036458 (1012.1 KiB) 7 RX errors 0 dropped 0 overruns 0 frame 0
8 TX packets 37131 bytes 86561010 (82.5 MiB) 9 TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
10
11 ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
12 inet 192.168.10.1 netmask 255.255.255.0 broadcast 192.168.10.255
1 [root@7a04ac0dcac7 /]# route -n 2 Kernel IP routing table 3 Destination Gateway Genmask Flags Metric Ref Use Iface 4 0.0.0.0 172.17.0.1 0.0.0.0 UG 0 0 0 eth0 5 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 6 [root@7a04ac0dcac7 /]# ping 192.168.10.1
7 PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 8 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.068 ms 9 64 bytes from 192.168.10.1: icmp_seq=2 ttl=64 time=0.101 ms