nandi/oripublic Fork 0
76d62ac0da1600e1c208017584c3fa22e54feaa3
Commits
Clone
git clone https://git.rickub.com/nandi/ori.git
git clone ssh://git@rickub.com/nandi/ori.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

forked from bots-garden/ori

build.sh · 31 lines · 1.0 KBBash Blame HistoryRaw
✨ Workspace panel, selectors, previews, desktop app, sandbox template, resizable file tree, light/dark theme 76d62ac k33g yesterday1#!/usr/bin/env bash
2# Builds the ori sandbox template image for amd64+arm64 and pushes it to
3# Docker Hub as k33g/ori:<version> and k33g/ori:latest.
4#
5# Usage:
6# ./template/build.sh # version 0.0.0
7# ./template/build.sh 0.1.0 # another version
8# PLATFORMS=linux/arm64 ./template/build.sh # single-arch build
9#
10# Requires: docker login (hub account k33g), and a buildx builder able to do
11# multi-platform builds. If the default builder refuses, create one with:
12# docker buildx create --name ori-builder --driver docker-container --use
13set -euo pipefail
14
15VERSION="${1:-0.0.1}"
16IMAGE="k33g/ori"
17PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}"
18
19SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
20CONTEXT="${SCRIPT_DIR}/.."
21
22echo "Building ${IMAGE}:${VERSION} (+latest) for ${PLATFORMS} and pushing to Docker Hub…"
23docker buildx build \
24 --platform "${PLATFORMS}" \
25 --file "${SCRIPT_DIR}/Dockerfile" \
26 --tag "${IMAGE}:${VERSION}" \
27 --tag "${IMAGE}:latest" \
28 --push \
29 "${CONTEXT}"
30
31echo "Done: ${IMAGE}:${VERSION} and ${IMAGE}:latest pushed."