Skip to content

feat(docker): add Docker resources#649

Open
austinm911 wants to merge 1 commit into
alchemy-run:mainfrom
austinm911:codex/docker-v2-resources
Open

feat(docker): add Docker resources#649
austinm911 wants to merge 1 commit into
alchemy-run:mainfrom
austinm911:codex/docker-v2-resources

Conversation

@austinm911

@austinm911 austinm911 commented Jun 18, 2026

Copy link
Copy Markdown

Human Summary

  • created with xhigh gpt 5.5. Did a few passes over it

Summary

  • add alchemy/Docker with Docker Image, RemoteImage, Container, Volume, and Network resources
  • add CLI-backed Docker provider helpers with Redacted secret handling, inspect parsing, adoption/ownership behavior, and Docker-gated integration tests
  • add an upstream-generic PostgreSQL 18 Alpine Docker example under examples/docker-postgres
  • document Docker resources from source JSDoc as active Docker context/daemon resources, separate from Cloudflare.Container

Verification

  • bun vitest run test/Docker/DockerApi.test.ts test/Docker/Docker.integration.test.ts
  • bun tsgo --noEmit -p tsconfig.json
  • bun run --filter docker-postgres-example build
  • bunx oxlint packages/alchemy/src/Docker packages/alchemy/test/Docker packages/alchemy/package.json examples/docker-postgres
  • bunx oxfmt --check packages/alchemy/src/Docker packages/alchemy/test/Docker packages/alchemy/package.json examples/docker-postgres
  • bun docs:gen
  • bun run docs:check
  • bun run docs:build
  • git diff --check

Note: bun run docs:build succeeds but emits the existing Node DEP0190 child-process warning.

Comment on lines +15 to +17
const password = yield* Config.redacted("POSTGRES_PASSWORD").pipe(
Config.withDefault(Redacted.make("alchemy-postgres")),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the Random resource to generate it

Comment on lines +52 to +56
const runtime = yield* Docker.Container.inspect(POSTGRES_CONTAINER).pipe(
Effect.catchTag("DockerCommandError", () =>
Effect.succeed(EMPTY_RUNTIME),
),
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is Docker.Container.inspect? Should this be Docker.inspectContainer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants