Skip to content

Instantly share code, notes, and snippets.

@Mathieu-COSYNS
Mathieu-COSYNS / docker-build-images.sh
Last active April 10, 2024 12:40
Build images from a docker compose file and tag them with current commit hash and tags
#!/bin/bash
# Docker registry to use to tag and push images
REGISTRY="" # If not set use Docker Hub
# Default compose file to use
COMPOSE_FILE="docker-compose.build.yml"
# Git info
GIT_COMMIT_HASH="$(git rev-parse HEAD)"