Docker 로 CentOS 이미지를 pull 하여 실행하니,
ip 확인을 위한 명령어 (ip addr, ip -a , ifconfig, ipconfig ..) 등이 모두 먹히지 않는다.
아마 최소버전으로 설치가 되었기 때문이라 추정하는데,
이를 해결하기 위해 ifconfig 사용을 위한 패키지를 설치한다.
# yum install net-tools
*아래는 centos7 버전에서 진행
[root@docker-desktop /]# yum install net-tools
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
* base: mirror.kakao.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): base/7/x86_64/group_gz | 153 kB 00:00:00
(2/4): extras/7/x86_64/primary_db | 205 kB 00:00:00
(3/4): base/7/x86_64/primary_db | 6.1 MB 00:00:02
(4/4): updates/7/x86_64/primary_db | 3.0 MB 00:00:03
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.25.20131004git.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
net-tools x86_64 2.0-0.25.20131004git.el7 base 306 k
Transaction Summary
=====================================================================================================================================================
Install 1 Package
Total download size: 306 k
Installed size: 917 k
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.25.20131004git.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for net-tools-2.0-0.25.20131004git.el7.x86_64.rpm is not installed
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm | 306 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-8.2003.0.el7.centos.x86_64 (@CentOS)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1
Verifying : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1
Installed:
net-tools.x86_64 0:2.0-0.25.20131004git.el7
Complete!
[root@docker-desktop /]#
[root@docker-desktop /]# ifconfig
br-6c10f9c08b13: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.19.0.1 netmask 255.255.0.0 broadcast 172.19.255.255
inet6 fe80::42:dfff:fefd:5863 prefixlen 64 scopeid 0x20<link>
ether 02:42:df:fd:58:63 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
'OS' 카테고리의 다른 글
[Linux] tar, gz, zip 압축 및 해제 명령어 정리 (0) | 2020.07.25 |
---|---|
[Linux] nohup 명령어 정리 (0) | 2020.07.22 |
[AIX] AIX 버전 확인 방법 및 의미 (0) | 2019.11.11 |
[Linux 7버전] hostname 변경하기 & 프롬프트 수정 (0) | 2019.05.18 |
[Linux 7버전 ] 네트워크 설정하기 (0) | 2019.05.18 |