forked from asyncapi/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 846 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM node:16-alpine
# Create a non-root user
RUN addgroup -S myuser && adduser -S myuser -G myuser
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
# 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 --ignore-scripts -g @asyncapi/cli
# Switch to the non-root user
USER myuser
ENTRYPOINT [ "asyncapi" ]