Swap busybox webserver to caddy
/ build_website (push) Successful in 8s Details
/ build_and_push_container (push) Successful in 9s Details

This commit is contained in:
Michał Rudowicz 2025-03-09 22:41:01 +01:00
parent 03c298d20f
commit f2c725b817
2 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
FROM git.hswro.org/fleg/serve_base:latest
FROM git.hswro.org/fleg/serve_base:caddy
# Copy the static website
# Use the .dockerignore file to control what ends up inside the image!

View File

@ -1,9 +1,7 @@
FROM busybox:stable
FROM caddy:2.9
# Create a non-root user to own the files and run our server
RUN adduser -D static
USER static
WORKDIR /home/static
# Run BusyBox httpd
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]
RUN echo -e ":3000 {\n\
root * /var/www\n\
file_server\n\
}" > /etc/caddy/Caddyfile
WORKDIR /var/www