|
| 1 | +================================== |
| 2 | +Basic working with docker registry |
| 3 | +================================== |
| 4 | + |
| 5 | +Install required packages |
| 6 | +========================= |
| 7 | + |
| 8 | +Ensure that the following packages are installed on your local machine:: |
| 9 | + |
| 10 | + docker.io >= v18.09 |
| 11 | + docker-compose >= v1.17 |
| 12 | + |
| 13 | +User and group |
| 14 | +============== |
| 15 | + |
| 16 | +Add your local user to the `docker` group, e.g. by:: |
| 17 | + |
| 18 | + sudo usermod -aG docker ${USER} |
| 19 | + |
| 20 | +. After this step logout and login again, so that the change has been applied and the new group |
| 21 | +is in effect. |
| 22 | + |
| 23 | + |
| 24 | +Configuring docker daemon |
| 25 | +========================= |
| 26 | + |
| 27 | +Reconfigure by editing `/etc/docker/daemon.json` as *root*:: |
| 28 | + |
| 29 | + { |
| 30 | + "debug": false |
| 31 | + } |
| 32 | + |
| 33 | +. |
| 34 | + |
| 35 | +Then reboot the machine or simply restart the daemon as *root* with:: |
| 36 | + |
| 37 | + sudo systemctl restart docker.service |
| 38 | + |
| 39 | +To check that the docker daemon was configured correctly, do a:: |
| 40 | + |
| 41 | + docker info |
| 42 | + |
| 43 | +which should result in an output similar to:: |
| 44 | + |
| 45 | + Client: |
| 46 | + Debug Mode: false |
| 47 | + |
| 48 | + Server: |
| 49 | + Containers: 0 |
| 50 | + Running: 0 |
| 51 | + Paused: 0 |
| 52 | + Stopped: 0 |
| 53 | + Images: 0 |
| 54 | + Server Version: 19.03.6 |
| 55 | + Storage Driver: overlay2 |
| 56 | + Backing Filesystem: extfs |
| 57 | + Supports d_type: true |
| 58 | + Native Overlay Diff: true |
| 59 | + Logging Driver: json-file |
| 60 | + Cgroup Driver: cgroupfs |
| 61 | + Plugins: |
| 62 | + Volume: local |
| 63 | + Network: bridge host ipvlan macvlan null overlay |
| 64 | + Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog |
| 65 | + Swarm: inactive |
| 66 | + Runtimes: runc |
| 67 | + Default Runtime: runc |
| 68 | + Init Binary: docker-init |
| 69 | + containerd version: |
| 70 | + runc version: |
| 71 | + init version: |
| 72 | + Security Options: |
| 73 | + apparmor |
| 74 | + seccomp |
| 75 | + Profile: default |
| 76 | + Kernel Version: 4.15.0-88-generic |
| 77 | + Operating System: Ubuntu 18.04.4 LTS |
| 78 | + OSType: linux |
| 79 | + Architecture: x86_64 |
| 80 | + CPUs: 4 |
| 81 | + Total Memory: 6.997GiB |
| 82 | + Name: ubuntu |
| 83 | + ID: H2N5:VOZ6:UO6V:B36O:MD6Q:7GXR:M4QY:7EBB:NC6R:HQCQ:7ARF:CZBH |
| 84 | + Docker Root Dir: /var/lib/docker |
| 85 | + Debug Mode: false |
| 86 | + Registry: https://index.docker.io/v1/ |
| 87 | + Labels: |
| 88 | + Experimental: false |
| 89 | + Insecure Registries: |
| 90 | + 127.0.0.0/8 |
| 91 | + Live Restore Enabled: false |
| 92 | + |
| 93 | + WARNING: No swap limit support |
| 94 | + |
| 95 | +Setup resolv.conf if necessary |
| 96 | +=============================== |
| 97 | + |
| 98 | +Docker uses `etc/resolv.conf` DNS information and passes that automatically to containers. If the file is not configured |
| 99 | +properly or if entries are not valid, the server adds automatically public Google DNS nameservers |
| 100 | +(8.8.8.8 and 8.8.4.4) to the container's DNS configuration. |
| 101 | + |
0 commit comments