Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(build): give the CLI ARG a default so external builders keep working

Vlad Ligai2b88d367021c
diff --git a/.github/workflows/check-dockerfile-pins.yml b/.github/workflows/check-dockerfile-pins.yml
index af6f6fb367..9eb63fb9b8 100644
--- a/.github/workflows/check-dockerfile-pins.yml
+++ b/.github/workflows/check-dockerfile-pins.yml
@@ -9,20 +9,30 @@ on:
jobs:
cli-pin:
- name: CLI version comes from build-versions.env
+ name: CLI pin matches build-versions.env
runs-on: ubuntu-latest
steps:
- name: ☁️ Checkout source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- # Five Dockerfiles install the CLI. The version is passed as a build arg
- # from build-versions.env so there is one place to edit; this catches a
- # version being hardcoded back into a Dockerfile.
- - name: No hardcoded CLI version
+ # Five Dockerfiles install the CLI. They keep an ARG default so external
+ # builders (Northflank, Render, anyone running docker build) work without
+ # passing anything; CI and compose override it from build-versions.env.
+ # This asserts the defaults have not drifted from that file.
+ - name: Defaults match build-versions.env
run: |
set -euo pipefail
- if grep -rnE 'infisical=[0-9]' --include='Dockerfile*' .; then
- echo "::error::Hardcoded Infisical CLI version. Use the INFISICAL_CLI_VERSION build arg and set it in build-versions.env"
- exit 1
+ want="$(grep -oE '^INFISICAL_CLI_VERSION=.+' build-versions.env | cut -d= -f2)"
+ echo "build-versions.env: $want"
+ bad=0
+ for f in $(grep -rl 'ARG INFISICAL_CLI_VERSION=' --include='Dockerfile*' .); do
+ got="$(grep -oE '^ARG INFISICAL_CLI_VERSION=.+' "$f" | cut -d= -f2)"
+ if [ "$got" != "$want" ]; then
+ echo "::error file=$f::ARG default is $got, build-versions.env says $want"
+ bad=1
+ fi
+ done
+ if grep -rnE 'install -y infisical=[0-9]' --include='Dockerfile*' .; then
+ echo "::error::Version hardcoded into the install. Use the ARG."
+ bad=1
fi
- grep -qE '^INFISICAL_CLI_VERSION=[0-9]+\.[0-9]+\.[0-9]+$' build-versions.env
- echo "CLI version is sourced from build-versions.env"
+ exit $bad
diff --git a/Dockerfile.fips.standalone-infisical b/Dockerfile.fips.standalone-infisical
index e05989ab67..3bb808574f 100644
--- a/Dockerfile.fips.standalone-infisical
+++ b/Dockerfile.fips.standalone-infisical
@@ -3,7 +3,7 @@ ARG POSTHOG_API_KEY=posthog-api-key
ARG INTERCOM_ID=intercom-id
ARG CAPTCHA_SITE_KEY=captcha-site-key
-ARG INFISICAL_CLI_VERSION
+ARG INFISICAL_CLI_VERSION=0.43.128
FROM node:22.22.0-trixie-slim AS base
diff --git a/Dockerfile.standalone-infisical b/Dockerfile.standalone-infisical
index c9218b594a..97889bf048 100644
--- a/Dockerfile.standalone-infisical
+++ b/Dockerfile.standalone-infisical
@@ -3,7 +3,7 @@ ARG POSTHOG_API_KEY=posthog-api-key
ARG INTERCOM_ID=intercom-id
ARG CAPTCHA_SITE_KEY=captcha-site-key
-ARG INFISICAL_CLI_VERSION
+ARG INFISICAL_CLI_VERSION=0.43.128
FROM node:22.22.0-trixie-slim AS base
diff --git a/backend/Dockerfile b/backend/Dockerfile
index ab08fe40a7..ca13524a78 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -1,5 +1,5 @@
# Build stage
-ARG INFISICAL_CLI_VERSION
+ARG INFISICAL_CLI_VERSION=0.43.128
FROM node:22.22.0-trixie-slim AS build
diff --git a/backend/Dockerfile.dev b/backend/Dockerfile.dev
index d753cd83b4..48d349f986 100644
--- a/backend/Dockerfile.dev
+++ b/backend/Dockerfile.dev
@@ -1,4 +1,4 @@
-ARG INFISICAL_CLI_VERSION
+ARG INFISICAL_CLI_VERSION=0.43.128
FROM debian:trixie-slim AS oracle
RUN apt-get update && apt-get install -y unzip wget ca-certificates \
diff --git a/backend/Dockerfile.fips-toolchain b/backend/Dockerfile.fips-toolchain
index a9f8eb5519..7ca14149f5 100644
--- a/backend/Dockerfile.fips-toolchain
+++ b/backend/Dockerfile.fips-toolchain
@@ -20,7 +20,7 @@
# removed. Also includes OpenSSL (Apache-2.0), SoftHSM2 (BSD-2-Clause), the Infisical
# CLI, and Debian packages under their respective licenses.
-ARG INFISICAL_CLI_VERSION
+ARG INFISICAL_CLI_VERSION=0.43.128
FROM debian:trixie-slim AS oracle
RUN apt-get update && apt-get install -y unzip wget ca-certificates \