-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated github action with Dockerfile changes
- Loading branch information
1 parent
5fe96e3
commit 31ba171
Showing
4 changed files
with
27 additions
and
8 deletions.
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
File renamed without changes.
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 |
---|---|---|
|
@@ -3,18 +3,36 @@ FROM node:18-alpine | |
# Create a non-root user | ||
RUN addgroup -S myuser && adduser -S myuser -G myuser | ||
|
||
RUN apk add --no-cache bash>5.1.16 git>2.42.0 chromium | ||
# Install necessary packages | ||
Check notice Code scanning / SonarCloud Arguments in long RUN instructions should be sorted Low
Sort these package names alphanumerically. See more on SonarCloud
|
||
RUN apk add --no-cache bash git chromium | ||
|
||
# Environment variables for Puppeteer for PDF generation by HTML Template | ||
# Environment variables for Puppeteer | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true | ||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser | ||
|
||
# Installing latest released npm package | ||
RUN npm install --ignore-scripts -g @asyncapi/cli | ||
FROM ubuntu:latest | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
# Copy the asyncapi directory | ||
COPY tmp/asyncapi/ /asyncapi | ||
|
||
# Make the bash file executable | ||
# Create a script that runs the desired command | ||
RUN echo "#!/bin/bash\n/asyncapi/bin/run" > /usr/local/bin/asyncapi | ||
|
||
# Make the script executable | ||
RUN chmod +x /usr/local/bin/asyncapi | ||
|
||
RUN ls -l /usr/local/bin/asyncapi | ||
|
||
# Change ownership to non-root user | ||
RUN chown -R myuser:myuser /asyncapi /usr/local/bin/asyncapi || echo "Failed to change ownership" | ||
|
||
# Copy the entrypoint script | ||
COPY github-action/entrypoint.sh /entrypoint.sh | ||
|
||
# Make the entrypoint script executable | ||
RUN chmod +x /entrypoint.sh | ||
|
||
FROM node:18-alpine | ||
|
||
# Set the entrypoint | ||
ENTRYPOINT ["/entrypoint.sh"] |
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