docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker [2022/08/23 08:44] – [Docker] admindocker [2024/11/09 16:11] (current) – [Docker] admin
Line 1: Line 1:
 ===== Docker ===== ===== Docker =====
-<code BaASH>+https://github.com/docker/labs/tree/master/networking/concepts https://sysdig.com/blog/dockerfile-best-practices/ \\ 
 +dns https://kerneltalks.com/networking/how-docker-container-dns-works/ \\ 
 +https://labs.play-with-docker.com/ \\ 
 +<code BASH>
 docker -D info docker -D info
 +docker compose --ansi=never up --quiet-pull
 </code> </code>
  
 +===== Docker.goodPackages =====
 +  * [[https://github.com/linuxserver|linuxserver]], [[https://github.com/hotio|hotio]], and [[https://github.com/binhex?tab=repositories|binhex]]    - packages [[https://www.reddit.com/r/unRAID/comments/18fcq05/binhex_who/|reddit]]
 +  * updates and good packages https://blog.bozdaganian.com/2020/12/12/watchtower-to-monitor-docker-image-updates/#2
 +  * unusual way https://www.youtube.com/watch?v=zfNqp85g5JM
 +  * https://github.com/docker/awesome-compose
 +
 +
 +
 +===== Docker.scout  =====
 +  * scout - security scan
 +
 +===== Docker.dedockify  =====
 +
 +  * dedockify https://github.com/mrhavens/Dedockify
 ==== Docker.Learning ==== ==== Docker.Learning ====
   * https://dockerlabs.collabnix.com/ - learning   * https://dockerlabs.collabnix.com/ - learning
   * base technology [[https://opensource.com/article/21/8/container-linux-technology|cgroups namespaces]] [[https://opensource.com/article/21/9/container-runtimes|runtimes]] [[https://opensource.com/article/21/8/container-image|container-image]]   * base technology [[https://opensource.com/article/21/8/container-linux-technology|cgroups namespaces]] [[https://opensource.com/article/21/9/container-runtimes|runtimes]] [[https://opensource.com/article/21/8/container-image|container-image]]
   * :!: !!! cloud native computing foundation - https://www.cncf.io/ ↬ https://landscape.cncf.io/   * :!: !!! cloud native computing foundation - https://www.cncf.io/ ↬ https://landscape.cncf.io/
 +  * https://habr.com/ru/company/timeweb/blog/558612/ - сеть контейнеров
  
   * https://www.youtube.com/watch?v=2MJn2yfa6A8 - новый docker compose и plugins смотреть   * https://www.youtube.com/watch?v=2MJn2yfa6A8 - новый docker compose и plugins смотреть
Line 26: Line 45:
 # docker find by name # docker find by name
 docker ps -a --format "{{.ID}} {{.Names}}" --filter name=UismvProd_Db docker ps -a --format "{{.ID}} {{.Names}}" --filter name=UismvProd_Db
 +
 +# docker find thin r/w layer aufs by container id - ``docker ps`` 
 +cat /var/lib/docker/image/aufs/layerdb/mounts/<CONTAINERID>*/mount-id
 +<ID>
 +# real files in -> /var/lib/docker/aufs/diff/<ID>    <ID>-init - entry point  of container aufs start
 +
 +# find container by name of catalog AUFS DIFF
 +grep 09c1f3c8c5adfb9241d477a61b5b04fd4cde07959dbee5ad385c4ef9c5e9d71d /var/lib/docker/image/aufs/layerdb/mounts/*/mount-id
 +<RESULT>
 +# this give id in path -> /var/lib/docker/aufs/diff/<RESULT>/etc/freeradius/
 +
  
 # inspecting docker with jq - mounts # inspecting docker with jq - mounts
Line 76: Line 106:
 docker-reception_pma_1                            63.4kB (virtual 89.7MB)                       0.0.0.0:8081->8080/tcp                                         Up 2 months docker-reception_pma_1                            63.4kB (virtual 89.7MB)                       0.0.0.0:8081->8080/tcp                                         Up 2 months
 docker-reception_nginx_1                          2B (virtual 126MB)                            0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp                       Up 3 months docker-reception_nginx_1                          2B (virtual 126MB)                            0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp                       Up 3 months
 +</code>
 +
 +
 +=== Docker. determining container responsible for largest overlay directories  ===
 +<code BASH>
 +# huge containers overlay container size
 +# as root $ sudo su     # make sure json parser is installed  $ apt-get install jq -y 
 +
 +# grab the size and path to the largest overlay dir
 +du /var/lib/docker/overlay2 -h | sort -h | tail -n 100 | grep -vE "overlay2$" > /tmp/large-overlay.txt
 +
 +# construct mappings of name to hash
 +docker inspect $(docker ps -qa) | jq -r 'map([.Name, .GraphDriver.Data.MergedDir]) | .[] | "\(.[0])\t\(.[1])"' > /tmp/docker-mappings.txt
 +
 +# for each hashed path, find matching container name
 +cat /tmp/large-overlay.txt | xargs -l bash -c 'if grep $1 /tmp/docker-mappings.txt; then echo -n "$0 "; fi'
 </code> </code>
 ==== Docker BuildKit==== ==== Docker BuildKit====
Line 228: Line 274:
  
  
 +===== Docker baseimage to ease creation of X graphical application containers GUI=====
 +  * https://github.com/jlesage/docker-baseimage-gui
 ===== Docker Network ===== ===== Docker Network =====
   * https://www.youtube.com/watch?v=bKFMS5C4CG0   * https://www.youtube.com/watch?v=bKFMS5C4CG0
  • docker.1661244271.txt.gz
  • Last modified: 2022/08/23 08:44
  • by admin