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

chore: improve Dockerfile cache handling and optimize image layers #1284

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/generator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Since 0.30.0 release Git is supported and required as a dependency
# Since 0.14.0 release of html-template chromium is needed for pdf generation.
# More custom packages for specific template should not be added to this dockerfile. Instead, we should come up with some extensibility solution.
RUN apk --update add git chromium && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
#is the following code correct for removing the cache after installing packages or stor it in cache mount?
Copy link
Collaborator

Choose a reason for hiding this comment

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

you are trying to fix the sonarcloud issue or ask question by this comment?

Copy link
Author

Choose a reason for hiding this comment

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

Its a solution im trying to provide.
And sorry for that Comment 😐, pl ignore it, I will remove it

RUN apk --update add --no-cache git chromium && \
npm install -g @asyncapi/generator@$ASYNCAPI_GENERATOR_VERSION && \
npm cache clean --force


# Installing latest released npm package
RUN npm install -g @asyncapi/generator@$ASYNCAPI_GENERATOR_VERSION
Expand Down
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove this file from PR

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 20 additions & 2 deletions 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 have you commited the package-lock.json?

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading