# Package versions
ARG GOLANG_VERSION="1.26.2"
ARG HUGO_VERSION="0.160.1"

# Build container
FROM core.harbor.brds.ca/library/golang:${GOLANG_VERSION}
ARG HUGO_VERSION
LABEL org.opencontainers.image.title="D-B.CA Hugo Website Builder"
LABEL org.opencontainers.image.authors="drew@brds.ca"
LABEL org.opencontainers.image.description="Image based on the standard Golang image containing Hugo."

WORKDIR /go/hugo
RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.tar.gz \
    && tar xzf hugo_${HUGO_VERSION}_linux-amd64.tar.gz \
    && mv hugo /usr/bin

WORKDIR /go
RUN rm -rf /go/hugo
