Skip to content

feat: Slim down official docker image #4183

Closed
@skycaptain

Description

@skycaptain

Expected Behavior

It's great to have this tool as an official container image (commitlint/commitlint:latest), as it significantly simplifies setting up a CI pipeline. However, the official image is quite large, which slows down the pipeline due to lengthy download times. dive reports 982 MB for commitlint/commitlint:19.5.0@sha256:49d2b9f47d7f8534b8863d19f6f901b4dd33b2f53ddb310a9a95230ffd12426a. According to dive, the official image includes layers from the builder container that may not be necessary to run commitlint.

Current Behavior

See above.

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

By using node:alpine and installing only the essential runtime components in a multi-stage build, it should be possible to reduce this image size to around 244 MB.

Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions