#!/usr/bin/env bash
# Builds the ori sandbox template image for amd64+arm64 and pushes it to# Docker Hub as k33g/ori:<version> and k33g/ori:latest.## Usage:# ./template/build.sh # version 0.0.0# ./template/build.sh 0.1.0 # another version# PLATFORMS=linux/arm64 ./template/build.sh # single-arch build## Requires: docker login (hub account k33g), and a buildx builder able to do# multi-platform builds. If the default builder refuses, create one with:# docker buildx create --name ori-builder --driver docker-container --useset -euo pipefail
VERSION="${1:-0.0.3}"IMAGE="k33g/ori"PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}"SCRIPT_DIR="$(cd"$(dirname "$0")"&&pwd)"CONTEXT="${SCRIPT_DIR}/.."echo"Building ${IMAGE}:${VERSION} (+latest) for ${PLATFORMS} and pushing to Docker Hub…"docker buildx build \
--platform "${PLATFORMS}"\
--file "${SCRIPT_DIR}/Dockerfile"\
--tag "${IMAGE}:${VERSION}"\
--tag "${IMAGE}:latest"\
--push \
"${CONTEXT}"echo"Done: ${IMAGE}:${VERSION} and ${IMAGE}:latest pushed."
One first-party cookie so a repeat visit isn't counted twice. No cross-site tracking, nothing stored until you accept. Cookie Policy.