Skip to content

Optimize Docker build stages and runtime layering #1

Description

@DenWin

Goal

Improve Docker layer reuse and keep build-only tooling out of the production image without changing ConvertX conversion behavior.

Implemented locally

  • Split development and production Bun dependencies into independent stages.
  • Copy package manifests before application source to preserve dependency caching.
  • Download Bun in a disposable stage.
  • Download VTracer in a disposable stage.
  • Keep curl and unzip out of the final runtime image.
  • Use Docker TARGETARCH for explicit amd64 and arm64 asset selection.
  • Harden downloads with curl failure handling.
  • Correct the eslint.config.ts build-context ignore entry.
  • Invoke the compiled application directly with Bun.
  • Pass docker build --check with no warnings.
  • Pass git diff --check.

Remaining validation

  • Complete a production image build.
  • Run representative converter smoke tests.
  • Compare image size and docker history with the previous Dockerfile.
  • Validate both linux/amd64 and linux/arm64.

Notes

The current working-tree implementation intentionally retains debian:testing-slim and the complete runtime package set until compatibility is proven separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions