Skip to content

Conversation

@Gmin2
Copy link
Contributor

@Gmin2 Gmin2 commented Aug 26, 2025

Description

Added dockerignore and copying only necessary files in Dockerfile

Related issue(s)
Fixes #1798

Inspired from #1800 (comment)

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2025

🦋 Changeset detected

Latest commit: a9351cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli Minor

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

asyncapi-bot pushed a commit to Gmin2/cli that referenced this pull request Aug 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2025

Changeset has been generated for this PR as part of auto-changeset workflow.

Please review the changeset before merging the PR.
---
'@asyncapi/cli': minor
---

feat: asyncapi on alpine distros

- de8e46a: feat: asyncapi on alpine distros
- 18f34d2: refactor: added dockerignore and improved Dockerfile
- d0141a8: fix: update dockerfile and lock file and not include lock file in pre commit hooks
- dc87fff: fix: update dockerfile and dockerignore to new github-action dockerfile

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 skip-changeset to the PR or remove the changeset and change PR title to something other than fix: or feat:.

asyncapi-bot pushed a commit to Gmin2/cli that referenced this pull request Aug 26, 2025
@Gmin2 Gmin2 force-pushed the optimized-dcoker branch from e9e4741 to 1c312c4 Compare August 26, 2025 18:11
asyncapi-bot pushed a commit to Gmin2/cli that referenced this pull request Aug 26, 2025
@Saru2003
Copy link

Hey @Gmin2 I really like this, I have a few suggestions/doubts if you don't mind.

  • Use COPY --chown=asyncapi:asyncapi instead of running chown -R after copying.
  • Include summary details of runtime to show the optimizations.
  • In .dockerignore, can we keep lockfile for reproducible builds?

@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty program related label label Sep 1, 2025
@aeworxet
Copy link
Contributor

aeworxet commented Sep 1, 2025

@asyncapi/bounty_team

@aeworxet aeworxet moved this to In Progress in Bounty Program Sep 1, 2025
asyncapi-bot pushed a commit to Gmin2/cli that referenced this pull request Sep 9, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 9, 2025

@Gmin2
Copy link
Contributor Author

Gmin2 commented Sep 10, 2025

can i have a review on this , idk why the test is broken here?

@neoandmatrix
Copy link
Contributor

can i have a review on this , idk why the test is broken here?

Upon viewing the changed files 2 files i found are in the PR but not required in my opinion:-

  1. As there are no new dependencies being added nor any change to package.json is there then i believe there should also be no lockfile change.
  2. The lefthook change is probably not needed.

CC:- @AayushSaini101 @Shurtu-gal @Souvikns

@AayushSaini101
Copy link
Collaborator

@Shurtu-gal can you take a look at this? thanks : )

Copy link
Collaborator

@Shurtu-gal Shurtu-gal left a comment

Choose a reason for hiding this comment

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

  1. Could you try running the Github action locally through docker image once? Reason I am asking this is action docker image might not be following the global dockerignore and has unnecessary source code. Can be seen here: https://github.com/asyncapi/cli/actions/runs/17598055693/job/49994587866?pr=1844
  2. We don't require puppeteer for github-action I believe.
  3. What are the sizes of docker images now compared to before?
  4. What about the time taken?

COPY --from=build /libraries /libraries

RUN cd /libraries && npm install --production --ignore-scripts

Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't we need to install node_modules again?

commands:
lint:
run: npm run lint
exclude: 'package-lock.json'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this needed?

@github-project-automation github-project-automation bot moved this from To Triage to Backlog in CLI - Kanban Oct 20, 2025
@Shurtu-gal
Copy link
Collaborator

Shurtu-gal commented Oct 20, 2025

Also there is conflict with package-lock. Tests should ideally pass upon pushing new commit.

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

Labels

bounty AsyncAPI Bounty program related label

Projects

Status: In Progress
Status: Backlog

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Docker images are take too long to build and are quite large.

7 participants