-
-
Notifications
You must be signed in to change notification settings - Fork 255
feat: optimize Dockerfile to reduce image size and build time #1817
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2e155c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Changeset has been generated for this PR as part of auto-changeset workflow.Please review the changeset before merging the PR.
If you are a maintainer or the author of the PR, you can change the changeset by clicking here Tip If you don't want auto-changeset to run on this PR, you can add the label |
|
The GitHub issue #1798 participates in the strictly serial AsyncAPI Bounty Program and is the responsibility of the assigned user. You are welcome to choose another GitHub issue for contribution. |
|
Description
This PR optimizes the Docker build process for the AsyncAPI CLI. The current Docker image is large and takes a long time to build. These changes address both of those concerns:
Changes Made:
ghcr.io/puppeteer/puppeteer:20.8.0
as the base image - it includes Chromium out of the box, which is required by some templates..dockerignore
file to exclude unnecessary files likenode_modules
,.git
,test
, etc., reducing build context.npm prune --omit=dev
to eliminate devDependencies from the final image.myuser
) for safer container execution./usr/local/bin/asyncapi
so the CLI can be invoked directly.Performance Comparison
asyncapi-cli-unoptimized
asyncapi-cli-revised
How to Build & Run
Related issue(s)
Resolves #1798