다음을 사용하여 Ubuntu 16.04에 docker-ce를 설치했습니다.설치 설명서공식 홈페이지에서 제공됩니다. Docker를 설치한 직후에는 호스트 시스템이 더 이상 인터넷에 연결할 수 없습니다. 적절한 인터넷 연결을 위해서는 제거하고 재부팅해야 합니다 docker-ce
.
이 질문은 다음과 유사해 보일 수 있습니다.이것, 그러나 거기에 설명된 방법은 작동하지 않습니다.
나는 여러 가지를 시도했습니다:
- 8.8.8.8에는 ping을 보낼 수 있지만 www.google.com에는 연결할 수 없습니다.
dns=dnsmasq
의 줄 에 주석을 달아 네트워크 관리자를 끄려고 했습니다\etc\NetworkManager\NetworkManager.conf
. 이것은 작동하지 않았습니다.8.8.8.8
에서 최초의 네임서버로 만들어 보았습니다\etc\resolv.conf
. 이는 작동하지만 파일에 언급된 대로 재부팅 후에는 손실됩니다.- 위의 변경 사항을 영구적으로 적용하기 위해 아래 파일
nameserver 8.8.8.8
에 추가 하고 . 이러한 방법은head
\etc\resolvconf\resolv.conf.d
server=8.8.8.8
\etc\dnsmasq.conf
여기, 간헐적으로 매우 느린 속도로 인터넷 연결을 제공합니다. 이 연결이 계속 끊어집니다.
기본 네임서버는 etc\resolv.conf
127.0.0.1입니다. 이는 Docker를 설치/제거할 때 변경되지 않습니다.
현재 환경
parth@parth-Inspiron-5565:/etc$ sudo docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.09.3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: e6b3f5632f50dbc4e9cb6288d911bf4f5e95b18e
runc version: 6635b4f0c6af3810594d2770f662f34ddc15b40d
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-46-generic
Operating System: Ubuntu 16.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.13GiB
Name: parth-Inspiron-5565
ID: R4FN:KR6P:OGYS:SV3X:K7FB:2OPX:YGOU:A5OY:LZ3O:QEQQ:EBRS:TY5F
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
WARNING: No swap limit support
도커 서비스 상태
parth@parth-Inspiron-5565:/etc$ sudo service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-03-20 15:12:09 IST; 5min ago
Docs: https://docs.docker.com
Main PID: 4803 (dockerd)
Tasks: 13
Memory: 31.3M
CPU: 754ms
CGroup: /system.slice/docker.service
└─4803 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Mar 20 15:12:07 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:07.811072977+05:30" level=warning msg="Your kernel does not support swap memory limit"
Mar 20 15:12:07 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:07.811201504+05:30" level=warning msg="Your kernel does not support cgroup rt period"
Mar 20 15:12:07 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:07.811233936+05:30" level=warning msg="Your kernel does not support cgroup rt runtime"
Mar 20 15:12:07 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:07.812451552+05:30" level=info msg="Loading containers: start."
Mar 20 15:12:08 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:08.754820327+05:30" level=info msg="Default bridge (docker0) is assigned with an IP address 172.31.0.0/16. Daemon option --bip can
Mar 20 15:12:08 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:08.945255414+05:30" level=info msg="Loading containers: done."
Mar 20 15:12:09 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:09.316910702+05:30" level=info msg="Docker daemon" commit=774a1f4 graphdriver(s)=overlay2 version=18.09.3
Mar 20 15:12:09 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:09.317457771+05:30" level=info msg="Daemon has completed initialization"
Mar 20 15:12:09 parth-Inspiron-5565 dockerd[4803]: time="2019-03-20T15:12:09.649782655+05:30" level=info msg="API listen on /var/run/docker.sock"
Mar 20 15:12:09 parth-Inspiron-5565 systemd[1]: Started Docker Application Container Engine.
ifconfig
parth@parth-Inspiron-5565:~$ ifconfig
br-c3e01d026d40 Link encap:Ethernet HWaddr 02:42:84:ad:16:49
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
docker0 Link encap:Ethernet HWaddr 02:42:c4:54:a7:3a
inet addr:172.31.0.1 Bcast:172.31.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
enp1s0 Link encap:Ethernet HWaddr 28:f1:0e:4a:77:f2
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:9142 errors:0 dropped:0 overruns:0 frame:0
TX packets:9142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1539138 (1.5 MB) TX bytes:1539138 (1.5 MB)
wlp2s0 Link encap:Ethernet HWaddr 94:53:30:48:08:e3
inet addr:192.168.0.109 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::24c0:73d4:1184:f7ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66481 errors:0 dropped:0 overruns:0 frame:0
TX packets:34205 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66056535 (66.0 MB) TX bytes:5806026 (5.8 MB)
Network Manager 인터페이스 정보
parth@parth-Inspiron-5565:~$ sudo nmcli dev show | grep -E 'IP4|DEVICE'
GENERAL.DEVICE: br-c3e01d026d40
IP4.ADDRESS[1]: 192.168.0.1/24
IP4.GATEWAY:
GENERAL.DEVICE: docker0
IP4.ADDRESS[1]: 172.31.0.1/16
IP4.GATEWAY:
GENERAL.DEVICE: wlp2s0
IP4.ADDRESS[1]: 192.168.0.109/24
IP4.GATEWAY: 192.168.0.1
IP4.ROUTE[1]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 192.168.0.1
GENERAL.DEVICE: enp1s0
GENERAL.DEVICE: lo
IP4.ADDRESS[1]: 127.0.0.1/8
brctl 출력
parth@parth-Inspiron-5565:~$ brctl show
bridge name bridge id STP enabled interfaces
br-c3e01d026d40 8000.024273663b1c no
docker0 8000.0242e83f65e7 no
노트북 구성
parth@parth-Inspiron-5565:/etc$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
parth@parth-Inspiron-5565:/etc$ uname -a
Linux parth-Inspiron-5565 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux