Skip to content

Commit

Permalink
rewrite fix. run as non-root
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Nov 24, 2024
1 parent 613ee7a commit 301ae49
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ FROM caddy:alpine

WORKDIR /usr/share/caddy/

# setup single `rewrite` rule in std. caddy config
RUN sed -i 's/file_server/file_server\n rewrite \/details\/ index.html/' /etc/caddy/Caddyfile

RUN cat /etc/caddy/Caddyfile
# setup single `rewrite` rule in std. caddy config:
# rewrite /details/* /index.html
RUN sed -i 's/file_server/file_server\n rewrite \/details\/* \/index.html/' /etc/caddy/Caddyfile

COPY . .

# pick some non-root user that `caddy` will run as
USER ftp

0 comments on commit 301ae49

Please sign in to comment.