Skip to content

Commit

Permalink
Add dev script for building linux images and pushing them to a repo (#…
Browse files Browse the repository at this point in the history
…253)

Co-authored-by: Mariano Uvalle <[email protected]>
  • Loading branch information
AYM1607 and Mariano Uvalle authored Nov 20, 2024
1 parent 92c1198 commit 96fff82
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dev/build-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

if [[ -z "${REGISTRY}" ]]; then
echo "REGISTRY must be set" > /dev/stderr
exit 1
fi

export TAG="$(date +%s)"

function build() {
cmd=$(basename $1)
docker build --platform=linux/amd64 --quiet -t "$REGISTRY/$cmd:$TAG" -f "$f/Dockerfile" .
[[ -z "${SKIP_PUSH}" ]] && docker push "$REGISTRY/$cmd:$TAG"
}

# Build!
for f in docker/*; do
build $f &
done
wait

echo "Success! built and pushed tag: $TAG"

0 comments on commit 96fff82

Please sign in to comment.