DirectorySecurity AdvisoriesPricing
Sign in
Directory
openspec logo

openspec

packaged by Chainguard

Last changed
Request a free trial

Contact our team to test out this image for free. Please also indicate any other images you would like to evaluate.

Tags
Overview
Comparison
Provenance
Specifications
SBOM
Vulnerabilities
Advisories

Chainguard Container for openspec

OpenSpec is a CLI from Fission AI for spec-driven development with AI coding assistants. It scaffolds a specification store in your repository, turns proposed work into structured change folders, validates specifications and their scenarios, and archives completed changes back into the living specification set.

Chainguard Containers are regularly-updated, secure-by-default container images.

Download this Container Image

For those with access, this container image is available on cgr.dev:

docker pull cgr.dev/ORGANIZATION/openspec:latest

Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.

Compatibility Notes

Upstream OpenSpec is distributed as an npm package. It publishes no container image and no Dockerfile, so there is no upstream image for this one to be compatible with. The CLI itself is the same one an openspec npm installation provides, built from the OpenSpec source against a packaged Node runtime, but everything about how it is packaged as a container is defined by Chainguard. Those decisions are documented below so you can rely on them.

PropertyValueWhy it is set this way

Entrypoint

/usr/bin/openspec

The CLI is the entrypoint, so arguments you pass to docker run are the arguments OpenSpec receives.

Working directory

/workspace, mode 0777

OpenSpec reads and writes the directory it runs in. The mode lets an arbitrary --user write there when nothing is mounted over it. A bind mount replaces this directory, in which case the host's own ownership applies instead.

User

nonroot, UID/GID 65532

The image never runs as root. Files it creates are owned by 65532 unless you override the user.

OPENSPEC_TELEMETRY

0

Upstream enables anonymous usage telemetry and an npm version check unless you opt out. Telemetry reports on every command, while the version check runs only for update and version --check. This one variable gates both, so a container stays off the network by default.

The image also carries the pieces the CLI shells out to: the Node runtime it executes under, git for openspec store setup, and a minimal shell so you can chain several OpenSpec commands in one container invocation.

There is no openspec daemon or server. The image runs one command and exits, which makes it a good fit for a CI step or a Kubernetes Job.

Getting Started

OpenSpec works on a checkout of your project, so mount the repository at /workspace. Run it as your own user so the files it creates stay owned by you:

docker run --rm -v "$PWD:/workspace" --user "$(id -u):$(id -g)" \
  cgr.dev/ORGANIZATION/openspec:latest init --tools claude

This scaffolds the specification store and the instruction files for your coding assistant:

Config: openspec/config.yaml (schema: spec-driven)

Because every invocation needs the same mount, a shell function keeps the remaining examples readable:

openspec() {
  docker run --rm -i -v "$PWD:/workspace" --user "$(id -u):$(id -g)" \
    -e XDG_CONFIG_HOME=/tmp/openspec-config \
    cgr.dev/ORGANIZATION/openspec:latest "$@"
}

/tmp is world-writable in the image, so the global configuration lands somewhere every UID can write. It is discarded with the container; mount a directory there instead when you want it to persist across runs.

Start a change to describe work you are proposing:

openspec new change add-greeting --schema spec-driven

The change begins empty, and you or your coding assistant fill in its artifacts. new change creates only the change directory, so make the spec directory before writing a delta into it:

mkdir -p openspec/changes/add-greeting/specs/greeting
cat > openspec/changes/add-greeting/specs/greeting/spec.md <<'EOF'
## Purpose
Welcome users with a predictable message when they open the application.

## ADDED Requirements

### Requirement: Welcome message
The system SHALL display a welcome message when opened.

#### Scenario: Application opens
- **WHEN** a user opens the application
- **THEN** the application displays "Welcome"
EOF

Validate the change before handing it to a reviewer or an agent:

openspec validate add-greeting --type change --strict
Change 'add-greeting' is valid

Validation is the gate worth wiring into CI. It exits non-zero and explains the problem when a requirement is incomplete, for example when a requirement has no scenario:

✗ [ERROR] greeting/spec.md: ADDED "Welcome message" must include at least one scenario

Once the work is done, archiving folds the change's deltas into the project's living specifications and clears it from the active list:

openspec archive add-greeting --yes
Specs updated successfully.
Change 'add-greeting' archived as '2026-01-15-add-greeting'.

Add --json to list, show, validate, and status when a script or an agent needs to consume the result rather than read it.

Configuration

OpenSpec stores per-project configuration in openspec/config.yaml and reads a handful of environment variables at runtime. The ones that matter in a container are:

VariableImage defaultPurpose

OPENSPEC_TELEMETRY

0

Set to 1 to restore upstream's anonymous telemetry and version check.

OPEN_SPEC_INTERACTIVE

unset

Set to 0 to suppress prompts when you allocate a TTY. A run without -t is already non-interactive.

XDG_CONFIG_HOME

unset

Point at a writable path so init on an initialized project and update can write the global configuration.

NO_COLOR

unset

Set to 1 to disable color in the workflow commands; pass --no-color to disable it everywhere.

OPENSPEC_NO_UPDATE_CHECK

unset

Set to 1 to skip only the version check.

In Kubernetes, run OpenSpec as a Job with the project mounted at /workspace. The volume has to carry the repository, since validate --specs has nothing to check against an empty directory:

apiVersion: batch/v1
kind: Job
metadata:
  name: openspec-validate
spec:
  backoffLimit: 0
  template:
    spec:
      restartPolicy: Never
      securityContext:
        runAsNonRoot: true
      containers:
        - name: openspec
          image: cgr.dev/ORGANIZATION/openspec:latest
          args: ["validate", "--specs", "--strict"]
          env:
            - name: OPEN_SPEC_INTERACTIVE
              value: "0"
          volumeMounts:
            - name: workspace
              mountPath: /workspace
      volumes:
        - name: workspace
          persistentVolumeClaim:
            claimName: my-project

An emptyDir works too when a prior step populates it, and needs no fsGroup, because kubelet creates it world-writable.

Documentation and Resources

What are Chainguard Containers?

Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.

All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.

The main features of Chainguard Containers include:

For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.

In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.

Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.

Need additional packages?

To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.

To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.

Learn More

Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.

Trademarks

This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.

Licenses

Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:

  • GCC-exception-3.1

  • GPL-3.0-or-later

  • ISC

  • MIT

For a complete list of licenses, please refer to this Image's SBOM.

Software license agreement

Compliance

Chainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.

SLSA compliance at Chainguard

This image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.

PCI DSS at Chainguard

A FIPS validated version of this image is available for FedRAMP compliance. STIG is included with FIPS image.


Related images
openspec-fips logoFIPS

openspec-fips


Category
Application

The trusted source for open source

Talk to an expert
PrivacyTerms

Product

Chainguard ContainersChainguard LibrariesChainguard VMsChainguard OS PackagesChainguard ActionsChainguard Agent SkillsIntegrationsPricing
© 2026 Chainguard, Inc. All Rights Reserved.
Chainguard® and the Chainguard logo are registered trademarks of Chainguard, Inc. in the United States and/or other countries.
The other respective trademarks mentioned on this page are owned by the respective companies and use of them does not imply any affiliation or endorsement.