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

Generate output files under configurable ID, e.g. as the current user #334

Merged
merged 2 commits into from
Apr 5, 2021
Merged
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
!rollup.config.js
!tsconfig.json
!yarn.lock
!entrypoint
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RUN apk update && apk upgrade && \
font-noto-devanagari@edge \
font-noto-arabic@edge \
font-noto-bengali@edge \
nss@edge
nss@edge \
su-exec

RUN addgroup -S marp && adduser -S -g marp marp \
&& mkdir -p /home/marp/app /home/marp/.cli \
Expand All @@ -31,6 +32,10 @@ RUN yarn add puppeteer-core@chrome-$(chromium-browser --version | sed -r 's/^Chr
RUN yarn install && yarn build && rm -rf ./src ./node_modules && yarn install --production && yarn cache clean \
&& node /home/marp/.cli/marp-cli.js --version

USER root

ENV MARP_USER marp:marp

WORKDIR /home/marp/app
ENTRYPOINT ["node", "/home/marp/.cli/marp-cli.js"]
ENTRYPOINT ["/home/marp/.cli/entrypoint"]
CMD ["--help"]
3 changes: 3 additions & 0 deletions entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/ash

exec su-exec "$MARP_USER" node /home/marp/.cli/marp-cli.js "$@"