Skip to content

Commit

Permalink
deploy: update SQLite build script
Browse files Browse the repository at this point in the history
Allow overriding the base image and the target os/arch.
  • Loading branch information
creachadair committed Oct 15, 2023
1 parent af942c7 commit 04e8ff6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deploy/install-sqlite3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#
# Build the SQLite3 CLI from source for linux/amd64.
#
# Optional parameters:
#
# BUILDBASE: base image (e.g., ubuntu:22.04)
# PLATFORM: os/arch (e.g., linux/amd64)
#
set -euo pipefail

here="$(dirname ${BASH_SOURCE[0]})"
Expand All @@ -19,12 +24,13 @@ year="$(echo "$latest" | cut -d/ -f1)"
vers="$(echo "$latest" | cut -d- -f3 | cut -d. -f1)"

img=sqlite3-builder:latest
plat=linux/amd64
buildbase="${BUILDBASE:-ubuntu:22.04}"
plat="${PLATFORM:-linux/amd64}"
out=./sqlite3-"$vers"
dl="$base/$latest"

cat <<EOF | docker build -t "$img" -
FROM --platform="$plat" ubuntu:22.04 as builder
FROM --platform="$plat" ubuntu:20.04 as builder
WORKDIR /root
Expand Down

0 comments on commit 04e8ff6

Please sign in to comment.