Eric Liu
8727ffa33f
All checks were successful
Hugo Publish CI / build-and-deploy (push) Successful in 11s
- Add Dockerfile to containerize the Hugo site - Update config.toml with new menu items and social links
25 lines
615 B
Docker
25 lines
615 B
Docker
# 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"] |