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

refactor: optimize dockerfile for AsyncAPI generator setup #1286

Closed
wants to merge 9 commits into from

Conversation

Light13008
Copy link

Description
-I tried to solve this issue

Copy link

changeset-bot bot commented Oct 5, 2024

⚠️ No Changeset found

Latest commit: c75f597

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Light13008 Light13008 changed the title refactor: Optimize Dockerfile for AsyncAPI generator setup refactor: optimize dockerfile for AsyncAPI generator setup Oct 5, 2024
- Moved the ARG instruction inside the build stage where it is used.
- Surrounded $ASYNCAPI_GENERATOR_VERSION with double quotes to prevent word splitting and globbing issues.
- Improved maintainability and reliability by ensuring proper variable handling.
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

please update your PR to address only the issue mentioned in sonar issue that you linked

FROM node:18-alpine

ARG ASYNCAPI_GENERATOR_VERSION="1.10.9" # Include ARG in the build stage and surround it with double quotes
Copy link
Contributor

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

# 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
Copy link
Contributor

Choose a reason for hiding this comment

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

From here also, pls. remove extra commnets

Copy link

sonarqubecloud bot commented Oct 8, 2024

@derberg
Copy link
Member

derberg commented Oct 9, 2024

@derberg derberg closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants