Compare commits
No commits in common. "f8c661229f23fb22796c9200480733355eb77263" and "99e201a0e1d631807463a2b4e5efe5d76d2fba3d" have entirely different histories.
f8c661229f
...
99e201a0e1
3 changed files with 33 additions and 70 deletions
|
@ -7,12 +7,13 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: debian-bookworm
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
hugo-version: ["0.127.0", "0.126.0"]
|
hugo-version: ["0.126.3"]
|
||||||
node-version: ["22"]
|
node-version: ["22"]
|
||||||
|
go-version: ["1.22.3"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -49,5 +50,5 @@ jobs:
|
||||||
NODE_VERSION=${{ matrix.node-version }}
|
NODE_VERSION=${{ matrix.node-version }}
|
||||||
GO_VERSION=${{ matrix.go-version }}
|
GO_VERSION=${{ matrix.go-version }}
|
||||||
tags: |
|
tags: |
|
||||||
git.myco.systems/mycosystems/hugo-ci:extended-alpine-${{ matrix.hugo-version }}-${{ matrix.node-version }}-${{ matrix.go-version }}
|
git.myco.systems/mycosystems/hugo-ci:extended-${{ matrix.hugo-version }}-${{ matrix.node-version }}-${{ matrix.go-version }}
|
||||||
git.myco.systems/mycosystems/hugo-ci:extended-alpine-latest
|
git.myco.systems/mycosystems/hugo-ci:extended-latest
|
72
Dockerfile
72
Dockerfile
|
@ -1,58 +1,24 @@
|
||||||
FROM alpine:3.20 as build
|
ARG GO_VERSION="1.22.3"
|
||||||
ARG HUGO_VERSION="0.127.0"
|
FROM golang:${GO_VERSION}-bullseye
|
||||||
ARG NODE_VERSION="22.2.0"
|
|
||||||
|
|
||||||
RUN apk add --update --no-cache xz libssl3 ca-certificates openssl-dev curl ninja pkgconf icu-dev git linux-headers libc6-compat make g++ gcc ada-dev brotli-dev c-ares-dev nghttp2-dev python3 samurai zlib-dev py3-pip libuv-dev
|
ARG HUGO_VERSION="0.126.3"
|
||||||
|
ARG NODE_VERSION="22"
|
||||||
|
|
||||||
WORKDIR /tmp
|
RUN apt update -y
|
||||||
|
RUN apt install tar gzip build-essential ca-certificates curl gnupg -y
|
||||||
RUN curl -sL -o hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz && \
|
RUN mkdir -p /etc/apt/keyrings
|
||||||
tar -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" && \
|
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||||
cp ./hugo /usr/bin/hugo && \
|
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||||
hugo version
|
RUN apt update -y && apt-get install -y nodejs
|
||||||
|
RUN npm i -g yarn pnpm
|
||||||
RUN curl -sL -o node-v${NODE_VERSION}.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.xz" && \
|
RUN mkdir /tmp/temph
|
||||||
tar -xf "node-v${NODE_VERSION}.tar.xz" && \
|
|
||||||
cd node-v22.2.0 && \
|
|
||||||
./configure --prefix=/usr \
|
|
||||||
--shared-brotli \
|
|
||||||
--shared-zlib \
|
|
||||||
--shared-libuv \
|
|
||||||
--shared-openssl \
|
|
||||||
--shared-cares \
|
|
||||||
--shared-nghttp2 \
|
|
||||||
--ninja \
|
|
||||||
--without-npm \
|
|
||||||
--with-intl=system-icu \
|
|
||||||
--openssl-use-def-ca-store && \
|
|
||||||
make BUILDTYPE=Release && \
|
|
||||||
make install
|
|
||||||
|
|
||||||
FROM alpine:3.20
|
|
||||||
|
|
||||||
RUN apk add --update --no-cache \
|
|
||||||
brotli \
|
|
||||||
zlib \
|
|
||||||
libuv \
|
|
||||||
openssl \
|
|
||||||
c-ares \
|
|
||||||
nghttp2 \
|
|
||||||
icu \
|
|
||||||
ca-certificates \
|
|
||||||
libgcc \
|
|
||||||
libstdc++ \
|
|
||||||
libc6-compat \
|
|
||||||
linux-headers \
|
|
||||||
rsync \
|
|
||||||
openssh \
|
|
||||||
npm \
|
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
COPY --from=build /usr/bin/hugo /usr/bin/hugo
|
|
||||||
COPY --from=build /usr/bin/node /usr/bin/node
|
|
||||||
COPY --from=build /usr/lib/node_modules /usr/lib/node_modules
|
|
||||||
COPY --from=build /usr/include/node /usr/include/node
|
|
||||||
RUN mkdir /home/app
|
RUN mkdir /home/app
|
||||||
|
WORKDIR /tmp/temph
|
||||||
|
RUN wget "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz"
|
||||||
|
RUN tar xf "hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz"
|
||||||
|
RUN mv ./hugo /usr/bin/hugo
|
||||||
WORKDIR /home/app
|
WORKDIR /home/app
|
||||||
|
# Cleanup
|
||||||
|
RUN rm -rfv /tmp/temph
|
||||||
|
|
||||||
ENTRYPOINT [ "/bin/sh" ]
|
ENTRYPOINT [ "/bin/bash" ]
|
16
README.md
16
README.md
|
@ -1,8 +1,6 @@
|
||||||
# Hugo Extended CI Container
|
# Hugo Extended CI Container
|
||||||
|
|
||||||
Based on golang:`go version`-alpine
|
Contains NodeJS, yarn, pnpm, npm
|
||||||
|
|
||||||
Contains nodejs, hugo, npm, rsync
|
|
||||||
|
|
||||||
Specific tag versions follow this definition:
|
Specific tag versions follow this definition:
|
||||||
extended-`hugo version`-`node vesion`-`go vesion`
|
extended-`hugo version`-`node vesion`-`go vesion`
|
||||||
|
@ -12,7 +10,7 @@ eg.
|
||||||
git.myco.systems/mycosystems/hugo-ci:extended-0.126.3-22-1.22.3
|
git.myco.systems/mycosystems/hugo-ci:extended-0.126.3-22-1.22.3
|
||||||
```
|
```
|
||||||
|
|
||||||
## To use
|
# To use
|
||||||
|
|
||||||
Run the following in your hugo directory:
|
Run the following in your hugo directory:
|
||||||
```
|
```
|
||||||
|
@ -23,10 +21,8 @@ To also host locally:
|
||||||
docker run -p 1313:1313 -v .:/home/app -ti --network=host git.myco.systems/mycosystems/hugo-ci:extended-latest
|
docker run -p 1313:1313 -v .:/home/app -ti --network=host git.myco.systems/mycosystems/hugo-ci:extended-latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Links
|
# Links
|
||||||
|
|
||||||
- ~~[BetterWeb Docker](https://hub.docker.com/r/betterweb/hugo)~~
|
~~[Docker](https://hub.docker.com/r/betterweb/hugo)~~
|
||||||
|
~~[Github](https://github.com/BetterCorp/hugo)~~
|
||||||
- ~~[BeterCorp Github](https://github.com/BetterCorp/hugo)~~
|
[MycoSystems Packages](https://git.myco.systems/mycosystems/-/packages/container/hugo-ci/versions)
|
||||||
|
|
||||||
- [MycoSystems Packages](https://git.myco.systems/mycosystems/-/packages/container/hugo-ci/versions)
|
|
Loading…
Add table
Reference in a new issue