Hello.
My hugo was working fine on localhost + gitlab pages using the monachus/hugo image.
I added SCSS and I had to use the extended version. Docker files that can reproduce the issue:
base image
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER adrian@coder.today
RUN apk add --update git asciidoctor libstdc++ \
&& apk upgrade \
&& apk add --no-cache ca-certificates
# Install HUGO
ENV HUGO_VERSION 0.53
ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.tar.gz
RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} && \
tar xzf ${HUGO_BINARY} && \
rm -r ${HUGO_BINARY} && \
mv hugo /usr/bin
and my image:
FROM bgadrian/hugo-extended AS builder
MAINTAINER adrian@coder.today
WORKDIR /src
COPY . .
ENV PORT=1313
EXPOSE 1313
#listening on all interfaces 0.0.0.0 is important!
ENTRYPOINT ["hugo", "serve", "--watch=false", "--bind=0.0.0.0"]
Now I cannot build it anymore because of the following issue: All the images from the project are not detected as images. Basically I have this:
{{ $first := .Resources.GetMatch "images/*" }}
{{ with $first }}
{{ if eq $first.ResourceType "image" }}
{{ $thumb := $first.Fill "300x300 center" }}
.....
{{ else }}
{{ errorf "file '%s' is not ResourceImage type (masonry) ResourceType:'%s' MediaType.SubType:'%s'" $first.RelPermalink $first.ResourceType $first.MediaType.SubType }}
{{ end }}
{{ end }}
And I get errors for all the images:
ERROR 2018/12/28 13:07:44 file '/tech/2014-08-28_unity-click-and-touch-script/images/1.jpeg' is not ResourceImage type (masonry) ResourceType:'' MediaType.SubType:''
My guess is that Hugo uses an external library to detect types and I’m missing it? I searched for a clue in the docs, source code and other dockerfiles but I’m stuck.
- on localhost Ubuntu 18 is working
- before adding the extended + alpine was working
- the $file.Content is there and is binary, so the file is found
Any clue? Thanks!