From 5125b8dfc86b6edb6c80edf170beae76c220f11b Mon Sep 17 00:00:00 2001 From: fechin Date: Sat, 24 Dec 2022 11:46:54 +0800 Subject: [PATCH] Dockerfile --- Dockerfile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8d07b7..f9cdd8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,18 @@ -FROM lipanski/docker-static-website:latest +FROM alpine:latest -# Copy your static files +# Install thttpd +RUN apk add --no-cache thttpd + +# Create a non-root user to own the files and run our server +RUN adduser -D static +USER static +WORKDIR /home/static + +# Copy the static website +# Use the .dockerignore file to control what ends up inside the image! COPY public . + +# Run thttpd +CMD ["thttpd", "-D", "-h", "0.0.0.0", "-p", "3000", "-d", "/home/static", "-u", "static", "-l", "-", "-M", "60"] + +EXPOSE 3000 \ No newline at end of file