Skip to content

v0.1.0

Choose a tag to compare

@bilby91 bilby91 released this 11 May 03:52
· 68 commits to main since this release
68fd3e5

Initial public release. A programmatic Go runtime for Dev Containers — resolve, build, up, exec, lifecycle, down — embeddable into Go applications without shelling out to @devcontainers/cli.

Install

go get github.com/crunchloop/devcontainer@v0.1.0

Requires Go 1.25+, a Docker daemon socket, and (for compose sources) Docker Compose v2.

Highlights

  • Sources — image, build (Dockerfile + args/target/cacheFrom), dockerComposeFile with override-file generation.
  • Features — OCI / HTTPS / local resolvers, content-addressed cache, DAG ordering (dependsOn / installsAfter / overrideFeatureInstallOrder), pre-baked-image hot path via the devcontainer.metadata label.
  • Container config — mounts, runArgs, containerEnv, remoteEnv, containerUser, remoteUser, updateRemoteUserUID (portable: Debian + Alpine), userEnvProbe (all four modes), init, privileged, capAdd, securityOpt, overrideCommand, shutdownAction.
  • Lifecycle — all six phases (initializeCommand, onCreateCommand, updateContentCommand, postCreateCommand, postStartCommand, postAttachCommand) with waitFor, parallel command form, versioned idempotency markers; host-side initializeCommand / secretsCommand run via an opt-in HostExecutor.
  • Substitution — full two-pass: ${localWorkspaceFolder[Basename]}, ${containerWorkspaceFolder[Basename]}, ${localEnv:VAR[:default]}, ${containerEnv:VAR[:default]}, ${devcontainerId}.
  • Image metadata — devcontainer.metadata label written on build and merged on subsequent Up / Attach (last-write-wins scalars, union+dedup slices, per-phase append for lifecycle hooks).
  • Events — experimental events package with Event marker interface, monotonic Seq() + Time(), 21 concrete types across config / feature / build / container / lifecycle / exec / engine groups.
  • Customizations — customizations.<tool> pass-through as map[string]json.RawMessage.

Known limitations

  • forwardPorts / portsAttributes are parsed and surfaced but not actuated.
  • No devcontainer-lock.json produced or honored.
  • No SSH / GPG agent forwarding by default.
  • The events package is experimental until v1.0.0; type shapes may evolve without a SemVer-major bump.

Changelog

See CHANGELOG.md.

Security

Report vulnerabilities privately via GitHub security advisories. See SECURITY.md for details.