docker 를 이용해서 centos7 를 설치 해보자.
# docker run -itd --name centos7 centos:7
# docker exec -it centos7 /bin/bash
접속 해보면
# ifconfig
를 이용해 IP 확인해보자.
하지만 centos7 이미지는 깡통이다. 아무것도 설치가 안되 있어 모두 설치 해줘야 한다.
# yum install -y net-tools
# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.5 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:ac:11:00:05 txqueuelen 0 (Ethernet)
RX packets 2657 bytes 12147479 (11.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2321 bytes 155712 (152.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
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
'Linux' 카테고리의 다른 글
docker image 만들어서 Private Docker Registry 등록 (0) | 2021.02.09 |
---|---|
docker volume mount (0) | 2021.02.03 |
docker: Error response from daemon: Conflict. The container name "/gitlab" is already in use by container (0) | 2021.01.26 |
This job is stuck because the project doesn't have any runners online assigned to it. (0) | 2021.01.26 |
gitea install cenots 7 (0) | 2021.01.25 |