Compare commits
3 commits
5211e564d5
...
f8c661229f
Author | SHA1 | Date | |
---|---|---|---|
f8c661229f | |||
ca6261ae29 | |||
5233735c71 |
3 changed files with 66 additions and 29 deletions
|
@ -3,17 +3,16 @@ name: Build And Publish Docker
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- "alpine"
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: debian-bookworm
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
hugo-version: ["0.126.3"]
|
||||
node-version: ["22.2.0"]
|
||||
go-version: ["1.22.3"]
|
||||
strategy:
|
||||
matrix:
|
||||
hugo-version: ["0.127.0", "0.126.0"]
|
||||
node-version: ["22"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
74
Dockerfile
74
Dockerfile
|
@ -1,22 +1,58 @@
|
|||
ARG GO_VERSION="1.22.3"
|
||||
FROM golang:${GO_VERSION}-alpine3.20
|
||||
|
||||
ARG HUGO_VERSION="0.126.3"
|
||||
FROM alpine:3.20 as build
|
||||
ARG HUGO_VERSION="0.127.0"
|
||||
ARG NODE_VERSION="22.2.0"
|
||||
|
||||
RUN apk update
|
||||
RUN apk add tar gzip curl rsync
|
||||
RUN mkdir /tmp/temph
|
||||
RUN mkdir /home/app
|
||||
WORKDIR /tmp/temph
|
||||
RUN wget "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
RUN tar -xf "node-v${NODE_VERSION}-linux-x64.tar.xz"
|
||||
RUN cp -R node-v${NODE_VERSION}-linux-x64/bin/* /usr/bin/
|
||||
RUN npm i -g yarn pnpm
|
||||
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
|
||||
RUN rm -rfv /tmp/temph
|
||||
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
|
||||
|
||||
ENTRYPOINT [ "/bin/sh" ]
|
||||
WORKDIR /tmp
|
||||
|
||||
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 && \
|
||||
tar -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" && \
|
||||
cp ./hugo /usr/bin/hugo && \
|
||||
hugo version
|
||||
|
||||
RUN curl -sL -o node-v${NODE_VERSION}.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.xz" && \
|
||||
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
|
||||
WORKDIR /home/app
|
||||
|
||||
ENTRYPOINT [ "/bin/sh" ]
|
10
README.md
10
README.md
|
@ -2,7 +2,7 @@
|
|||
|
||||
Based on golang:`go version`-alpine
|
||||
|
||||
Contains nodejs, yarn, pnpm, npm
|
||||
Contains nodejs, hugo, npm, rsync
|
||||
|
||||
Specific tag versions follow this definition:
|
||||
extended-`hugo version`-`node vesion`-`go vesion`
|
||||
|
@ -25,6 +25,8 @@ docker run -p 1313:1313 -v .:/home/app -ti --network=host git.myco.systems/mycos
|
|||
|
||||
## Links
|
||||
|
||||
~~[Docker](https://hub.docker.com/r/betterweb/hugo)~~
|
||||
~~[Github](https://github.com/BetterCorp/hugo)~~
|
||||
[MycoSystems Packages](https://git.myco.systems/mycosystems/-/packages/container/hugo-ci/versions)
|
||||
- ~~[BetterWeb Docker](https://hub.docker.com/r/betterweb/hugo)~~
|
||||
|
||||
- ~~[BeterCorp Github](https://github.com/BetterCorp/hugo)~~
|
||||
|
||||
- [MycoSystems Packages](https://git.myco.systems/mycosystems/-/packages/container/hugo-ci/versions)
|
Loading…
Add table
Reference in a new issue