Docker
Build multi-platform images
You can use the plugin Buildx to build images for multiplatform:
# Setup buildx
$ docker buildx create --use
# Build for amd64 and arm64
$ docker buildx build --platform linux/amd64,linux/arm64 . --push -t <image-name>
References:
Stop / remove all Docker containers
$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)
- List containers with
docker ps. The argument-a/--allinclude also the stopped ones and-q/--quietdisplays only the numeric IDs. - Use
docker stopanddocker rmwith the output of the first command (bash command substitution).
References: