adriano.fyi/Dockerfile

20 lines
474 B
Text
Raw Normal View History

2023-01-07 16:52:53 +00:00
FROM klakegg/hugo:ext
RUN apt-get update && apt-get install busybox
# Create a non-root user to own the files and run our server
RUN adduser --disabled-login static
# Copy the static website
# Use the .dockerignore file to control what ends up inside the image!
COPY . /home/static
WORKDIR /home/static
RUN hugo -d public
RUN chown -R static:static /home/static
USER static
# Run BusyBox httpd
ENTRYPOINT ["busybox", "httpd", "-f", "-v", "-p", "3000", "-h", "public"]