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

Commit

Permalink
Change user to be valid for wordpress-hardened
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed May 19, 2022
1 parent 6ebf323 commit 82bdd47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ADD container-files/opt/build/entrypoint /opt/build/entrypoint
RUN cd /opt/build/entrypoint && make build install
RUN mkdir -p /tmp /.config /.config/caddy \
&& touch /etc/caddy/Caddyfile /tmp/.pid /etc/caddy/rules/wordpress/rules.conf \
&& chown -R 65168:65168 /etc/caddy/Caddyfile /tmp /etc/caddy/rules/wordpress/ /etc/caddy/rules/wordpress/rules.conf /.config
&& chown -R 65161:65161 /etc/caddy/Caddyfile /tmp /etc/caddy/rules/wordpress/ /etc/caddy/rules/wordpress/rules.conf /.config


# ===========================================================================================
Expand Down Expand Up @@ -98,7 +98,7 @@ COPY --from=builder /usr/bin/caddy /usr/bin/caddy
# pre-validate default configuration
RUN ["/usr/bin/entrypoint", "/usr/bin/caddy", "validate", "-config", "/etc/caddy/Caddyfile"]

USER 65168
USER 65161
CMD ["/usr/bin/caddy", "run", "-pidfile", "/tmp/.pid", "-config", "/etc/caddy/Caddyfile"]

EXPOSE 8090
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Simple WAF reverse-proxy using Caddy and CORAZA WAF, contains few predefined but
- Contains embedded rulesets e.g. OWASP Core Ruleset, Wordpress-specific
- Kubernetes and cloud native
- Perfectly integrates with Wordpress and not only
- Non-root container (running as `uid=65168`)
- Non-root container (running as `uid=65161`)
- Real [distroless image based on scratch](https://hub.docker.com/_/scratch) **with only 2 binaries and few config files inside**
- Developed purely in Golang, [even entrypoint script was written in Golang instead of Bash](container-files/opt/build/entrypoint/entrypoint.go)
- Autonomous image, actively maintained by [Dependabot](https://github.com/dependabot) ;-)
Expand Down

0 comments on commit 82bdd47

Please sign in to comment.