# Use Alpine Linux as the base image FROM alpine:3.19 # Install necessary packages including Hugo from edge repository and vim RUN apk add --no-cache \ git \ curl \ libc6-compat \ vim && \ apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo # Set the working directory in the container WORKDIR /src # Copy the Hugo project files into the container COPY . . # Initialize and update submodules RUN git submodule update --init --recursive # Expose the default Hugo port EXPOSE 1313 # Command to run Hugo server CMD ["hugo", "server", "--bind", "0.0.0.0"]