FROM ubuntu:latest# Update the package list and install necessary dependenciesRUN apt-get update && apt-get install -y \
wget \
curl \
unzip \
git \
&& rm -rf /var/lib/apt/lists/*# Define Hugo version (you can change this) ARGHUGO_VERSION=0.145.0# Download and install HugoRUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-amd64.deb \
&& dpkg -i hugo_extended_${HUGO_VERSION}_Linux-amd64.deb \
&& rm hugo_extended_${HUGO_VERSION}_Linux-amd64.deb# Verify Hugo installationRUN hugo version# Set the working directory (optional)WORKDIR /app/# Expose the Hugo port (optional)EXPOSE 1313# Define the default command (optional)CMD["hugo","server","-D","-b","http://0.0.0.0/","--bind=0.0.0.0","--port=1313"]# Or a simple bash shell#CMD ["/bin/bash"]