Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
Make some updates to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
XSmeets committed Feb 20, 2024
1 parent 1d2e190 commit d9795c7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
FROM ghcr.io/paperless-ngx/paperless-ngx:latest
RUN useradd -ou 1000 -g1000 container
RUN useradd --home-dir /home/container --create-home --non-unique --uid 1000 --gid 1000 container && userdel paperless

USER container
ENV USER=container HOME=/home/container

WORKDIR /home/container

COPY ./entrypoint.sh /entrypoint.sh

CMD ["/bin/bash", "/entrypoint.sh"]
9 changes: 9 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
cd /home/container

# Replace Startup Variables
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"

# Run the Server
${MODIFIED_STARTUP}

0 comments on commit d9795c7

Please sign in to comment.