Permit user to use docker command

sudo usermod -aG docker <user>

Build and push image

docker login [-u <username>] [server]
docker build -t <[registry/]name[:version]> .
docker push <[registry/]name[:version]>

Build image for multiple cpu architectures

docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
docker buildx create --use --name multi-arch-builder
docker buildx inspect --bootstrap # check architectures
# then you can copy desired architectures to --platform argument
docker buildx build --platform=linux/amd64,linux/arm64,linux/arm/v7 -t kelgors/gemweb:1.0.0 .

Get running containers size

docker ps -as

Remove unused stuff from Docker

# remove dangling images
docker images prune
# remove dangling containers/networks/images
docker system prune

Last-Updated: 2022-08-15
Content from gemini://

More info about Gemini protocol