Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Docker Hub Tools

A tiny Docker image with a set of Bash scripts for:

  1. Installing Docker and enabling the experimental mode.
  2. Building and tagging multi-platform Docker images.
  3. Pushing README file to Docker Hub.

Getting the script

Create a container and copy the scripts file from it.

id=$(docker create moikot/docker-tools)
docker cp $id:/scripts.sh /tmp/scripts.sh && docker rm -v $id

Install the latest Docker

/tmp/scripts.sh update_docker

The command updates Docker to the latest version and enables the experimental mode in Docker daemon.

Build multi-platform Docker images

  • Image name: moikot/foobar
  • Git tag: v1.0.0
  • Platforms: linux/amd64, linux/arm64/v8
/tmp/scripts.sh build_images
  moikot/foobar v1.0.0 \
  linux/amd64,linux/arm64/v8 \
  [additional build arguments]

NOTE: Additional build arguments are passed directly to docker buildx build command.

Push README.md to Docker Hub

/tmp/scripts.sh push_readme \
  moikot/foobar README.md \
  [docker_hub_user] [docker_hub_password]
You can’t perform that action at this time.