Skip to content

Commit

Permalink
Merge pull request #1583 from fluxcd/update-docker-support
Browse files Browse the repository at this point in the history
Add golang to hugo-support image
  • Loading branch information
makkes authored Jul 27, 2023
2 parents ba8af95 + b7eb950 commit c886f2d
Show file tree
Hide file tree
Showing 3 changed files with 985 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/build-push-hugo-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
Expand All @@ -37,7 +38,9 @@ jobs:
uses: docker/build-push-action@v4
with:
context: hugo
platforms: linux/amd64,linux/arm64
push: true
builder: ${{ steps.buildx.outputs.name }}
build-args: |
HUGO_VERSION=${{ env.hugo_version }}
HUGO_BUILD_TAGS=extended
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ARG HUGO_VERSION
FROM fluxcd/website:hugo-${HUGO_VERSION}-extended
COPY --from=golang:1.19-alpine /usr/local/go/ /usr/local/go/

ENV PATH="/usr/local/go/bin:${PATH}"

RUN apk update && \
apk add --no-cache \
Expand All @@ -24,7 +27,9 @@ RUN apk update && \
COPY requirements.txt /tmp
RUN python3 -m pip install -r /tmp/requirements.txt
RUN ln -s `which python3` /usr/bin/python
COPY package.json package-lock.json /site/
RUN npm i
RUN git config --global --add safe.directory /site

# VOLUME /site # provided by upstream
# WORKDIR /site
Expand Down
Loading

0 comments on commit c886f2d

Please sign in to comment.