Skip to content

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

update docs

Thiago Araujo da Silvacde8ec5b42ed
diff --git a/backend/CLAUDE.md b/backend/CLAUDE.md
index ab642a0964..0f9d8017d2 100644
--- a/backend/CLAUDE.md
+++ b/backend/CLAUDE.md
@@ -45,17 +45,48 @@ pull the toolchain instead of spending ~15min compiling it. Consequences worth k
image blobs there evicts the `node_modules` caches of every workflow.
- **The published image is an internal CI build cache, not a supported artifact.** It is
public only so CI and local dev can pull it; it carries no support or compatibility
- guarantee. It is *not* the FIPS product image — that is `infisical/infisical-fips`, built
- from `Dockerfile.fips.standalone-infisical`. OCI labels on the image say the same.
+ guarantee. It is *not* the FIPS product image; that one is `infisical/infisical-fips`,
+ built from `Dockerfile.fips.standalone-infisical`. OCI labels on the image say the same.
- **Keep every third-party fetch pinned and checksummed.** SoftHSM2 is pinned to a commit
SHA (tags are mutable); both OpenSSL tarballs and the Oracle Instant Client zip are
SHA256-verified; the Infisical CLI apt package is version-pinned. Oracle Instant Client
is redistributed under the Oracle Free Distribution, Hosting, and Use Terms, which
- require the license to travel with it — `/opt/oracle/instantclient_23_26/BASIC_LICENSE`
+ require the license to travel with it, so `/opt/oracle/instantclient_23_26/BASIC_LICENSE`
must not be removed.
-- To iterate on the toolchain locally:
- `docker build -f backend/Dockerfile.fips-toolchain -t fips-toolchain:local backend` then
- `TOOLCHAIN_IMAGE=fips-toolchain:local docker compose -f docker-compose.dev.yml build backend`.
+
+##### Building the dev stack without GHCR
+
+`docker compose -f docker-compose.dev.yml build backend` pulls the toolchain from GHCR by
+default. If GHCR is down, the package is private, you're offline, or you're iterating on the
+toolchain itself, build it locally once and point the compose build at it:
+
+```bash
+# 1. Build the toolchain from source (~15min, or ~2min if your layer cache is warm)
+docker build -f backend/Dockerfile.fips-toolchain -t fips-toolchain:local backend
+
+# 2. Prefer .env, so it survives every compose invocation (see the warning below)
+echo 'TOOLCHAIN_IMAGE=fips-toolchain:local' >> .env
+
+# ...or pass it per-invocation. Both forms work but are easy to forget:
+TOOLCHAIN_IMAGE=fips-toolchain:local docker compose -f docker-compose.dev.yml build backend
+docker compose -f docker-compose.dev.yml build --build-arg TOOLCHAIN_IMAGE=fips-toolchain:local backend
+```
+
+**Use `.env` rather than a one-off env var.** The documented start command in
+`docs/contributing/platform/developing.mdx` is `up --build`, which rebuilds the backend and
+re-resolves the `TOOLCHAIN_IMAGE` default, so a per-invocation override silently stops
+applying and you're back to a failing GHCR pull. Compose interpolates the project `.env` for
+every invocation, so putting it there sticks.
+
+Notes:
+
+- Step 1 is only needed once per change to `Dockerfile.fips-toolchain`. The local tag name is
+ arbitrary; it just has to match what you point `TOOLCHAIN_IMAGE` at.
+- An already-built `backend` image keeps working if GHCR is unreachable, as long as you don't
+ pass `--build`. This only bites on a rebuild.
+- This is not an offline story. The toolchain build itself still fetches Debian packages, both
+ OpenSSL tarballs, SoftHSM sources, and the Oracle client. With no network at all, neither
+ path works and you need a previously built image.
### Database
diff --git a/backend/Dockerfile.fips-toolchain b/backend/Dockerfile.fips-toolchain
index 40f9823893..814a3fa9a3 100644
--- a/backend/Dockerfile.fips-toolchain
+++ b/backend/Dockerfile.fips-toolchain
@@ -10,7 +10,7 @@
# SCOPE: this is an internal CI build cache, not a supported Infisical artifact. It is
# published publicly only so CI and local dev can pull it instead of recompiling. It is
# not part of any public API, carries no support or compatibility guarantee, and its tags
-# may change or be deleted at any time. It is NOT the FIPS product image — that is
+# may change or be deleted at any time. It is NOT the FIPS product image. That one is
# infisical/infisical-fips, built from Dockerfile.fips.standalone-infisical.
#
# THIRD-PARTY CONTENTS: includes Oracle Instant Client, redistributed under the Oracle
diff --git a/docs/contributing/platform/developing.mdx b/docs/contributing/platform/developing.mdx
index ab3a870ed2..d266402c6d 100644
--- a/docs/contributing/platform/developing.mdx
+++ b/docs/contributing/platform/developing.mdx
@@ -32,6 +32,31 @@ docker compose -f docker-compose.dev.yml up --build --force-recreate
Once all the services have spun up, browse to http://localhost:8080.
+#### If the backend image fails to build
+
+The backend dev image is built on top of a prebuilt toolchain image (SoftHSM2, Oracle Instant
+Client, and two OpenSSL builds) that we publish to GHCR, so you don't have to spend ~15 minutes
+compiling it. The build pulls `ghcr.io/infisical/backend-fips-toolchain:main` by default.
+
+If that pull fails (GHCR outage, no network, or you're working on the toolchain itself), build
+it locally once and point the backend build at it:
+
+```bash
+# Build the toolchain from source. Takes ~15 minutes.
+docker build -f backend/Dockerfile.fips-toolchain -t fips-toolchain:local backend
+
+# Point the backend build at your local copy by adding this to your .env
+echo 'TOOLCHAIN_IMAGE=fips-toolchain:local' >> .env
+```
+
+Then start the stack as usual. Putting it in `.env` matters: the start command above uses
+`--build`, so a one-off `TOOLCHAIN_IMAGE=... docker compose build` would be ignored on the next
+`up --build` and you'd be back to a failing GHCR pull.
+
+You only have to redo the first step if `backend/Dockerfile.fips-toolchain` changes. If you
+already have a working backend image and don't pass `--build`, a GHCR outage won't affect you
+at all.
+
#### Local SMTP with Mailhog
The dev Docker Compose includes [Mailhog](https://github.com/mailhog/MailHog), a local SMTP server that captures all outgoing emails. This is useful for testing email-based flows like user invitations, password resets, and other notifications without sending real emails.