mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Fix running docs site with docker (#5512)
* Update docs site local build Clean up makefile Ignore container-image.sentinel Fix hugo server errors Ignore files Add makefile credit * Indentation per feedback * Address PR feedback. Remove sentinel file * Remove change to .gitignore
This commit is contained in:
@@ -1,3 +1,46 @@
|
||||
FROM klakegg/hugo:ext-alpine
|
||||
# Credit to Julien Guyomard (https://github.com/jguyomard)
|
||||
# Credit to the Kubernetes Website team.
|
||||
# This Dockerfile is based on:
|
||||
# (https://github.com/kubernetes/website/blob/main/Dockerfile)
|
||||
|
||||
RUN apk add git
|
||||
FROM docker.io/library/golang:1.20-alpine
|
||||
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
gcc \
|
||||
g++ \
|
||||
musl-dev \
|
||||
build-base \
|
||||
libc6-compat
|
||||
|
||||
ARG HUGO_VERSION
|
||||
|
||||
RUN mkdir $HOME/src && \
|
||||
cd $HOME/src && \
|
||||
curl -L https://github.com/gohugoio/hugo/archive/refs/tags/v${HUGO_VERSION}.tar.gz | tar -xz && \
|
||||
cd "hugo-${HUGO_VERSION}" && \
|
||||
go install --tags extended
|
||||
|
||||
FROM docker.io/library/golang:1.20-alpine
|
||||
|
||||
RUN apk add --no-cache \
|
||||
runuser \
|
||||
git \
|
||||
openssh-client \
|
||||
rsync \
|
||||
npm && \
|
||||
npm install -D autoprefixer postcss-cli
|
||||
|
||||
RUN mkdir -p /var/hugo && \
|
||||
addgroup -Sg 1000 hugo && \
|
||||
adduser -Sg hugo -u 1000 -h /var/hugo hugo && \
|
||||
chown -R hugo: /var/hugo && \
|
||||
runuser -u hugo -- git config --global --add safe.directory /src
|
||||
|
||||
COPY --from=0 /go/bin/hugo /usr/local/bin/hugo
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
USER hugo:hugo
|
||||
|
||||
EXPOSE 1313
|
||||
|
||||
Reference in New Issue
Block a user