Install Docker

Install Docker Tutorial

Setup Buildx Environment

docker buildx create \
  --name container-builder \
  --driver docker-container \
  --bootstrap --use

Build the Container

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
-t [repository]/[containername]:[tag] . --push

The -t flag sets the naming convention for the container, . tells docker where to build the container (where the Dockerfile is located), and --push sends it to the Docker Hub repository.

Tag a Docker Container

docker tag [name]:[tag] [new-name]:[new-tag]

Save and Transfer a Docker Container

docker save -o [name] [name]:[tag]
rsync -P [name] [target]:[location]
docker load -i [name]