Project

General

Profile

Docker Ubuntu

Install Docker CE auf Ubuntu 16.04

Links:
https://docs.docker.com/install/linux/docker-ce/ubuntu/

ggf. alte docker Pakete

apt remove docker docker-engine docker.io

docker CE Repository einbinden

apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
## verify finger print key
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 
apt update

Install docker CE Pakete

apt install docker-ce

Install aktuelles docker-compose

aktuelle Version ist unter: https://github.com/docker/compose/releases zu finden.

sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Proxy Settings (Ubuntu 18.04)

https://www.serverlab.ca/tutorials/containers/docker/how-to-set-the-proxy-for-docker-on-ubuntu

Eigene Docker Registy auf Ubuntu 18.04

start docker container

docker run -d \
  -p 5000:5000 \
  --restart=always \
  --name registry \
  -v /opt/docker/certs:/certs \
  -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/wildcard-wzat_de.cer \
  -e REGISTRY_HTTP_TLS_KEY=/certs/wildcard-wzat_de.key \
  -v /opt/docker/auth:/auth \
  -e "REGISTRY_AUTH=htpasswd" \
  -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \
  -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \
  -v /opt/docker/registry/data:/var/lib/registry \
  registry:2

Beschreibung der Parameter folgt.

Client Ubuntu 18.04 mit User/Password Anmeldung

docker login

sudo docker login --username=<deinUsername> --password=<deinPassword> <docker-registry-URL>:<port>

Login Succeeded

aktuelle Bug beim Ubuntu 18.04 Client : Fehlermeldung

Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`

Bug ist mehrfach gemeldet "nach der Meldung Googlen"

quick FIX : Install weitere Pakete

sudo apt install gnupg2 pass

docker Deamon über Proxy (systemctl)

mkdir -p /etc/systemd/system/docker.service.d

edit file /etc/systemd/system/docker.service.d/http-proxy.conf

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:8080/" 
sudo systemctl daemon-reload
sudo systemctl restart docker