docker image run fully offline, without metadata lookup
https://news.ycombinator.com/item?id=40744290
FROM nginx:1.21.6@sha256:ec5c36ef5a2c29cf90d5b59c5f9f90272b472c604983b474b201bc2bfa123e6f
Linux desktop in container, web gui vnc like
https://github.com/linuxserver/docker-baseimage-kasmvnc
https://github.com/kasmtech/workspaces-images
More than one process in container, process supervisor, lightweight systemd alternative
https://github.com/just-containers/s6-overlay
Cache docker builds. Docker layer caching
https://news.ycombinator.com/item?id=39956327
https://blacksmith.sh/blog/cache-is-king-a-guide-for-docker-layer-caching-in-github-actions
bash entrypoint
This allows passing args to executed app
ENTRYPOINT ["bash", "/run.sh"]
run.sh
#!/bin/bash
python3 -m app "$@"
Init process
Running multiple processes in containercontainers
Better alternative to supervisor
https://github.com/just-containers/s6-overlay
S6 – Skarnet’s small supervision suite
https://news.ycombinator.com/item?id=41530040
https://skarnet.org/software/s6/why.html
https://ahmet.im/blog/minimal-init-process-for-containers/
https://wiki.gentoo.org/wiki/Comparison_of_init_systems
https://www.linuxserver.io/
Snippets
# grep in Docker logs
# https://gist.github.com/roylee0704/b5c8090e6cbfe1a9ae6c63062623a7cd
docker logs nginx |& grep "127."
# rebuild image properly
# https://stackoverflow.com/questions/35231362/dockerfile-and-docker-compose-not-updating-with-new-instructions
docker compose up --build --remove-orphans --force-recreate
# check which container uses interface with veth name
# https://forums.docker.com/t/relationship-between-interface-vethxxxxx-and-container/12872/27
# https://github.com/cslev/find_veth_docker
wget https://raw.githubusercontent.com/micahculpepper/dockerveth/master/dockerveth.sh