nandi/oripublic Fork 0
main
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

🛟 Updated. 00224b1 · on main · k33g · 11h ago
build.sh · 31 lines · 1.0 KBBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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 --use
set -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."