Create a custom network

Creates a bridge network with its own subnet

docker network create --driver bridge --subnet 172.30.0.0/24 mynet

tool
docker46 commands
tags
dockernetwork

More docker commands

  • docker save myapp:1.0 | gzip > myapp.tar.gz && docker load < myapp.tar.gz

    Exports an image to an archive and imports it again, for example on another host

  • HEALTHCHECK --interval=10s --timeout=3s --retries=3 CMD curl -sf http://localhost:8080/health || exit 1

    Native Docker healthcheck with curl; this line goes into the Dockerfile

  • docker scout cves --only-fixed myapp:latest

    Shows only CVEs that already have a fix

  • docker run --rm -it --pid=host --network=host --privileged nicolaka/netshoot

    Network debugging toolbox that shares the host PID namespace and network

  • docker buildx bake -f docker-bake.hcl --push

    Builds and pushes several targets from one HCL file, in parallel and without repeated definitions

all 46 docker commands