Deploy a registry server

https://docs.docker.com/registry/deploying/

Пример API

https://www.baeldung.com/ops/docker-registry-api-list-images-tags

Доступ к ресурсу через авторизацию

docker login -u user -p password private.repository:5000

Для удаления

curl https://docker-registry/v2/my-ubuntu/tags/list
curl -v https://docker-registry/v2/my-ubuntu/manifests/latest -H 'Accept: application/vnd.docker.distribution.manifest.v2+json'
curl -X DELETE https://docker-registry/v2/my-ubuntu/manifests/sha256:a3785f78ab8547ae2710c89e627783cfa7ee7824d3468cae6835c9f4eae23ff7 -v

Error response from daemon: Get «https://registry-1.docker.io/v2/»: proxyconnect tcp: dial tcp 192.168.65.1:3128: connect: connection refused

This problem is solved by following steps:

  1. Open «Windows Security»;
  2. Open «App & Browser control»;
  3. Click «Exploit protection settings» at the bottom;
  4. Switch to «Program settings» tab;
  5. Locate «C:\WINDOWS\System32\vmcompute.exe» in the list and expand it;
  6. You would see the box «system overriding» under «Control Flow Guard (CFG)» is checked, disable it. If what you see is different with description here, maybe what described here is not applicable for you.

Reference here.

Установка docker-ce в Ubuntu 18.04 нарушает подключение к Интернету хоста

/etc/docker/daemon.json                                                                                                                                                          
{
  "bip": "172.31.0.1/16"
}

systemd-resolve --status предоставил мне DNS-сервер 192.168.3.56 и ifconfig docker0 выдал мне: inet 192.168.65.2 netmask 255.255.0.0 broadcast 192.168.255.255 Все, что мне нужно было сделать, это добавить / etc / docker / daemon.json, как указано выше, и перезапустите docker

Статьи:

  • https://superuser.com/questions/1336567/installing-docker-ce-in-ubuntu-18-04-breaks-internet-connectivity-of-host
  • https://forums.docker.com/t/cant-access-internet-after-installing-docker-in-a-fresh-ubuntu-18-04-machine/53416/7

python & postgresql

from sqlalchemy import create_engine, text
import pandas as pd

engine = create_engine('postgresql://user:password@host:5432/dbname')
conn = engine.connect()

query = text("""SELECT * FROM core.sd_settings""")
df = pd.read_sql_query(query, conn)

print(df.head())

conn.close()

Примечание: требуется установка следующих компонентов

# requirements.txt
SQLAlchemy
psycopg2
pandas
# pip install -r requirements.txt