Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Slim down official docker image #4183

Open
4 tasks
skycaptain opened this issue Oct 17, 2024 · 1 comment · May be fixed by #4185
Open
4 tasks

feat: Slim down official docker image #4183

skycaptain opened this issue Oct 17, 2024 · 1 comment · May be fixed by #4185
Labels

Comments

@skycaptain
Copy link

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

@escapedcat
Copy link
Member

Sounds reasonable. Wanna create a PR?

/cc @kaiehrhardt wdyt?

skycaptain added a commit to skycaptain/commitlint that referenced this issue Oct 18, 2024
This reduces the container image size from about 950MB to 200MB.

Closes conventional-changelog#4183.
@skycaptain skycaptain linked a pull request Oct 18, 2024 that will close this issue
7 tasks
skycaptain added a commit to skycaptain/commitlint that referenced this issue Oct 19, 2024
This reduces the container image size from about 950MB to 200MB.

Closes conventional-changelog#4183.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants