-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
refactor: optimize dockerfile for AsyncAPI generator setup #1286
Closed
Closed
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4473874
refactor: Optimize Dockerfile for AsyncAPI generator setup
Light13008 a71fa0f
fix: resolve ARG scope and variable quoting issues in Dockerfile
Light13008 0fc7853
Unnecessary escape character ' \$ 'were removed
Light13008 1cb101e
Revert "Unnecessary escape character ' \$ 'were removed"
Light13008 c95b953
Unnecessary character escapes were removed '\$'
Light13008 caacdd9
Revert "Unnecessary character escapes were removed '\$'"
Light13008 e0d290e
Unwanted commets were removed
Light13008 73498ff
Unwanted whitespace was removed
Light13008 c75f597
fix(security): add --ignore-scripts flag to npm install to prevent sh…
Light13008 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
ARG ASYNCAPI_GENERATOR_VERSION=1.10.9 | ||
|
||
FROM node:18-alpine | ||
|
||
ARG ASYNCAPI_GENERATOR_VERSION="1.10.9" # Include ARG in the build stage and surround it with double quotes | ||
|
||
WORKDIR /app | ||
|
||
# Since 0.14.0 release of html-template chromium is needed for pdf generation | ||
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium-browser | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium-browser" | ||
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/* | ||
|
||
# Installing latest released npm package | ||
RUN npm install -g @asyncapi/generator@$ASYNCAPI_GENERATOR_VERSION | ||
RUN apk --update add --no-cache git chromium && \ | ||
npm install -g @asyncapi/generator@"$ASYNCAPI_GENERATOR_VERSION" && \ # Surround variable with double quotes | ||
npm cache clean --force | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From here also, pls. remove extra commnets |
||
|
||
# Define the entry point for the AsyncAPI generator | ||
ENTRYPOINT [ "ag" ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Pls. remove these unwanted comments