diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-12 13:53:16 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-12 13:53:16 -0400 |
commit | fefed51ba577431c18b6f703b9ea3c5fa43a73d3 (patch) | |
tree | d31d253816b690da1fe840ab09863d013825f8a6 /env | |
parent | openrc (diff) | |
download | images-fefed51ba577431c18b6f703b9ea3c5fa43a73d3.tar.gz images-fefed51ba577431c18b6f703b9ea3c5fa43a73d3.tar.bz2 images-fefed51ba577431c18b6f703b9ea3c5fa43a73d3.zip |
update minecraft image
Diffstat (limited to 'env')
-rwxr-xr-x | env | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -0,0 +1,32 @@ +#!/bin/sh + +# container registry +REMOTE="g.freya.cat" +USER="freya" + +# image info +IMAGE="image" +TAG="latest" +ARCH="linux/amd64,linux/arm64" + +# builder args +ALPINE_VERSION="3.21" + +init() { + docker login "$REMOTE" -u "$USER" + current="$(docker buildx inspect | head -n 1 | awk '{ print $2 }')" + if [ "$current" != "builder" ]; then + docker buildx create --name builder + docker buildx use builder + fi +} + +buildx() { + docker buildx build \ + --push \ + --platform "$ARCH" \ + -t "$REMOTE/$USER/$IMAGE:$TAG" \ + --build-arg "ALPINE_VERSION=$ALPINE_VERSION" \ + $@ \ + . +} |