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

Run widoco with unprivileged user in container #669

Merged
merged 5 commits into from
Jan 5, 2024
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
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ FROM openjdk:17-slim
RUN apt-get update
RUN apt-get install -y libfreetype6 fontconfig

RUN useradd widoco
RUN mkdir -p /usr/local/widoco
RUN chown -R widoco:widoco /usr/local/widoco

USER widoco

WORKDIR /usr/local/widoco

COPY --from=BUILD_IMAGE /var/build/widoco/JAR/widoco.jar .

ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar widoco.jar ${0} ${@}"]
ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar widoco.jar ${0} ${@}"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ with host directories. For instance:

```bash
docker run -ti --rm \
-v `pwd`/test:/usr/local/widoco/in \
-v `pwd`/target/generated-doc:/usr/local/widoco/out \
-v `pwd`/test:/usr/local/widoco/in:Z \
-v `pwd`/target/generated-doc:/usr/local/widoco/out:Z \
dgarijo/widoco -ontFile in/bne.ttl -outFolder out -rewriteAll
```

Expand Down
Loading