#!/bin/bash SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # build the executable "${SCRIPT_DIR}/build.sh" amd64 # build the docker image docker buildx build --load -t gitea.jde.nz/public/simple-object-storage:test --platform linux/amd64 . DATADIR="/home/${USER}/.simple_object_storage" if [ ! -d "${DATADIR}" ]; then mkdir -p "${DATADIR}" fi CONFIGFILE="${SCRIPT_DIR}/.docker/config.json" if [ ! -f "${CONFIGFILE}" ]; then echo "Config file not found: ${CONFIGFILE}" exit 1 fi docker run --rm \ -p 8123:80 \ --name simple-object-storage-test \ -v "${DATADIR}":/data/storage \ -v "${CONFIGFILE}":/data/sos_config.json:ro \ gitea.jde.nz/public/simple-object-storage:test