npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lockzero/docker

v1.0.0

Published

Inject LockZero secrets into Docker run, build, and compose commands

Readme

@lockzero/docker

Inject LockZero vault secrets into Docker commands at runtime. Secrets are fetched live from the LockZero API and passed to Docker subprocesses — never written to disk or committed to source control.

Installation

npm install -g @lockzero/docker
# or run without installing:
npx @lockzero/docker <command>

Authentication

Set your LockZero API key as an environment variable:

export LOCKZERO_API_KEY=lz_live_...

Or pass it directly with --api-key.

Commands

run — Inject secrets into a container at runtime

lockzero-docker run --namespace openai,stripe -- docker run myimage
lockzero-docker run -n openai -n stripe -- docker run -it ubuntu bash

Secrets are injected as -e KEY=VALUE flags. They live only in the container's environment — never written to disk.

build — Inject secrets as build args

lockzero-docker build --namespace openai -- docker build -t myimage .

Warning: Build args appear in image layer metadata. Use --no-warn to suppress the warning. Prefer run for production secrets.

compose — Inject secrets into docker compose

lockzero-docker compose --namespace openai,stripe -- docker compose up -d
lockzero-docker compose -n db -- docker compose run --rm migrate

Secrets are exported into the child process environment. Reference them in docker-compose.yml via ${MY_SECRET} substitution or environment: mappings.

export — Print secrets to stdout

lockzero-docker export --namespace openai --format dotenv > .env
lockzero-docker export --namespace openai,stripe --format json
lockzero-docker export --namespace db --format env | source /dev/stdin

Available formats: dotenv (default), env (export KEY=VALUE), json.

Warning: Output contains plaintext secrets. Never commit to source control.

Options

All commands accept:

| Option | Default | Description | |--------|---------|-------------| | -n, --namespace <ns> | required | Namespace(s) to fetch. Repeat flag or comma-separate. | | --api-key <key> | $LOCKZERO_API_KEY | LockZero API key | | --base-url <url> | https://api.lockzero.io | API base URL | | --verbose | false | Print fetch progress to stderr |

Examples

See examples/ for:

  • docker-compose.yml — compose file referencing LockZero-injected variables
  • Dockerfile.example — multi-stage build using build args safely

Security Notes

  • Secrets are fetched from LockZero at command invocation time and passed directly to the subprocess. They are not written to disk.
  • With run, secrets live only in the container's environment. They are not in the image layers.
  • With build, secrets appear in image layer metadata. Use multi-stage builds and avoid embedding build args in the final stage.
  • The export command outputs plaintext — treat output files like passwords.