Docker
Fleetingregistry
desktop
host.docker.internal
- Référence externe : https://stackoverflow.com/questions/31324981/how-to-access-host-port-from-docker-container/61424570#61424570
We recommend that you connect to the special DNS name host.docker.internal, which resolves to the internal IP address used by the host.
also available not in docker desktop, needing an extra –add-host flag
also available not in docker desktop, needing an extra –add-host flag
also communicate with the host via host.docker.internal. This won’t work automatically, but you need to provide the following run flag:
–add-host=host.docker.internal:host-gateway
network
custom hosts, defined in /etc/hosts on the host machine, aren’t inherited by containers
-
Référence externe : https://docs.docker.com/network/
You can add other hosts into a container’s /etc/hosts file by using one or more –add-host flags
— https://docs.docker.com/reference/cli/docker/container/run/#add-host
Custom hosts, defined in /etc/hosts on the host machine, aren’t inherited by containers.
isolated from one another
Not only that, but you can’t connect to alpine3 from alpine1 by its IP address either
— https://docs.docker.com/network/network-tutorial-standalone/
a container can be connected to several networks, but will resolves dns names only in its starting network
alpine4 is connected to both the default bridge network and alpine-net. It should be able to reach all of the other containers. However, you will need to address alpine3 by its IP address.
— https://docs.docker.com/network/network-tutorial-standalone/
custom network
automatic service discovery
On user-defined networks like alpine-net, containers can not only communicate by IP address, but can also resolve a container name to an IP address. This capability is called automatic service discovery.
— https://docs.docker.com/network/network-tutorial-standalone/
Automatic service discovery can only resolve custom container names, not default automatically generated container names,
— https://docs.docker.com/network/network-tutorial-standalone/
default bridge
not recommended for production
default bridge network is not recommended for production
— https://docs.docker.com/network/network-tutorial-standalone/
cannot resolve dns names
try pinging the alpine2 container by container name. This will fail
— https://docs.docker.com/network/network-tutorial-standalone/
Networking with standalone containers
- Référence externe : https://docs.docker.com/network/network-tutorial-standalone/
Notice that this network’s gateway is 172.18.0.1, as opposed to the default bridge network, whose gateway is 172.17.0.1. The exact IP address may be different on your system.
— https://docs.docker.com/network/network-tutorial-standalone/
docker run -dit –name alpine1 –network alpine-net alpine ash
— https://docs.docker.com/network/network-tutorial-standalone/
Notes pointant ici
- adresse de la machine hôte dans docker
- asylo
- AWS
- bitnami
- budtmo/docker-android
- buildx
- cargo-chef
- distroless
- docker Access to Raspberry Pi GPIO Pins
- docker context
- docker does not check the mtu at startup
- docker embedded dns
- docker engine 20.10
- docker entrypoint use ARG and ENV
- docker entrypoint vs kubernetes command
- docker hub
- docker looses the dns configuration
- Docker MTU issues and solutions
- docker run
- docker, containerd and runc
- docker-compose
- docker-in-docker
- Electro Monkeys
- fix Docker MTU issues and solutions
- how Docker container DNS works
- how I debug MTU issues in k3d in docker in earthly in docker in k8s (blog)
- how should systemd-resolved and docker interact?
- how to get a docker manifest from docker-hub
- how to run containerized Bluetooth applications with BlueZ
- k3d
- Leverage multi-CPU architecture support | Docker Documentation
- multi-stage build
- oci
- OCI artifact
- podman
- point sur les container runtimes
- rootless
- share variable in multi-stage Dockerfile: ARG before FROM not substituted
- traefik et maesh : de l ingress au service mesh avec Michael Matur
- Une Architecture GitOps from scratch : Gitlab, Ansible, Terraform, Kub et AWS (L.Ortola A.Moreau)
- with docker desktop (blog)