Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM gcr.io/distroless/cc-debian12:nonroot
ARG IMAGE_TAG=nonroot
FROM gcr.io/distroless/cc-debian12:${IMAGE_TAG}

ARG BINARY=objectstore
COPY ${BINARY} /bin/entrypoint
Expand Down
8 changes: 8 additions & 0 deletions scripts/build-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ set -euo pipefail
cd "$(dirname "$0")/.."

BINARY=${1:-objectstore}
DEBUG_IMAGE=${DEBUG_IMAGE:-false}
case "$BINARY" in
objectstore) PACKAGE="objectstore-server" ;;
*) PACKAGE="$BINARY" ;;
esac

if [[ "$DEBUG_IMAGE" =~ ^(true|1|yes|on)$ ]]; then
IMAGE_TAG="debug-nonroot"
else
IMAGE_TAG="nonroot"
fi

docker build \
--platform linux/arm64 \
-f Dockerfile.cross \
Expand All @@ -26,6 +33,7 @@ docker run --rm \
docker build \
--platform linux/amd64 \
-f Dockerfile \
--build-arg IMAGE_TAG="$IMAGE_TAG" \
--build-arg BINARY="$BINARY" \
-t "$BINARY:latest" \
"target/x86_64-unknown-linux-gnu/release/"
Loading