From e82a9c9323e38695967fdb45a2e2fd3209f401cd Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 14:44:09 +0300 Subject: [PATCH 01/12] add arm support for alpine images --- src/config/alpine-ext.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index 79bc947d..04c1fea8 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -15,6 +15,8 @@ images: - postcss platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + CI ext-alpine-ci: @@ -23,6 +25,8 @@ images: - $(VERSION)-ext-alpine-ci platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Onbuild ext-alpine-onbuild: @@ -31,6 +35,8 @@ images: - $(VERSION)-ext-alpine-onbuild platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor ext-asciidoctor: @@ -54,6 +60,8 @@ images: - $(VERSION)-ext-asciidoctor-ci platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor + Onbuild ext-asciidoctor-onbuild: @@ -62,6 +70,8 @@ images: - $(VERSION)-ext-asciidoctor-onbuild platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Pandoc ext-pandoc: @@ -78,6 +88,8 @@ images: - rst2html platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Pandoc + CI ext-pandoc-ci: @@ -86,6 +98,8 @@ images: - $(VERSION)-ext-pandoc-ci platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Pandoc + Onbuild ext-pandoc-onbuild: @@ -94,6 +108,8 @@ images: - $(VERSION)-ext-pandoc-onbuild platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 tests: hugo: From 49173d45f00c8c5c5f8a59ab99a0d2f269a1dbaf Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 14:49:58 +0300 Subject: [PATCH 02/12] add missing platform for alpine images --- src/config/alpine-ext.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index 04c1fea8..d0d13e8c 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -52,6 +52,8 @@ images: - postcss platforms: - linux/amd64 + - linux/arm/v7 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor + CI ext-asciidoctor-ci: From c72606e8922e514070b207a73a1b4128ce846ed3 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 15:06:14 +0300 Subject: [PATCH 03/12] updates --- src/config/alpine-ext.yaml | 139 +++++++++++------------------- src/files/_script/golang.sh | 2 +- src/files/_script/nodejs-glibc.sh | 2 +- src/files/_script/nodejs-musl.sh | 2 +- src/files/_script/pandoc.sh | 2 +- 5 files changed, 56 insertions(+), 91 deletions(-) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index d0d13e8c..a1987e57 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -1,127 +1,109 @@ -name: Alpine (extended) +name: Alpine (standard) images: - # Alpine + Hugo extended - ext-alpine: - target: ext-alpine + # Alpine + Hugo + alpine: + target: alpine edge: true + platforms: + - linux/amd64 + - linux/arm/v7 + - linux/arm64 alias: - - $(VERSION)-ext-alpine + - $(VERSION)-alpine tests: - hugo - - golang - - node - - yarn - - postcss + + # Alpine + Hugo + CI + alpine-ci: + target: alpine--ci platforms: - linux/amd64 - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + CI - ext-alpine-ci: - target: ext-alpine--ci alias: - - $(VERSION)-ext-alpine-ci + - $(VERSION)-alpine-ci + + # Alpine + Hugo + Onbuild + alpine-onbuild: + target: alpine--onbuild platforms: - linux/amd64 - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Onbuild - ext-alpine-onbuild: - target: ext-alpine--onbuild alias: - - $(VERSION)-ext-alpine-onbuild + - $(VERSION)-alpine-onbuild + + # Alpine + Hugo + Asciidoctor + asciidoctor: + target: asciidoctor + edge: true platforms: - linux/amd64 - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Asciidoctor - ext-asciidoctor: - target: ext-asciidoctor alias: - - $(VERSION)-ext-asciidoctor + - "$(VERSION)-asciidoctor" tests: - hugo - asciidoctor - - golang - - node - - yarn - - postcss + + # Alpine + Hugo + Asciidoctor + CI + asciidoctor-ci: + target: asciidoctor--ci platforms: - linux/amd64 - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Asciidoctor + CI - ext-asciidoctor-ci: - target: ext-asciidoctor--ci alias: - - $(VERSION)-ext-asciidoctor-ci + - "$(VERSION)-asciidoctor-ci" + + # Alpine + Hugo + Asciidoctor + Onbuild + asciidoctor-onbuild: + target: asciidoctor--onbuild platforms: - linux/amd64 - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Asciidoctor + Onbuild - ext-asciidoctor-onbuild: - target: ext-asciidoctor--onbuild alias: - - $(VERSION)-ext-asciidoctor-onbuild + - "$(VERSION)-asciidoctor-onbuild" + + # Alpine + Hugo + Pandoc + pandoc: + target: pandoc + edge: true platforms: - linux/amd64 - - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Pandoc - ext-pandoc: - target: ext-pandoc alias: - - $(VERSION)-ext-pandoc + - $(VERSION)-pandoc tests: - hugo - pandoc - - golang - - node - - yarn - - postcss - - rst2html - platforms: - - linux/amd64 - - linux/arm/v7 - - linux/arm64 - # Alpine + Hugo extended + Pandoc + CI - ext-pandoc-ci: - target: ext-pandoc--ci - alias: - - $(VERSION)-ext-pandoc-ci + # Alpine + Hugo + Pandoc + CI + pandoc-ci: + target: pandoc--ci platforms: - linux/amd64 - - linux/arm/v7 - linux/arm64 - - # Alpine + Hugo extended + Pandoc + Onbuild - ext-pandoc-onbuild: - target: ext-pandoc--onbuild alias: - - $(VERSION)-ext-pandoc-onbuild + - $(VERSION)-pandoc-ci + + # Alpine + Hugo + Pandoc + Onbuild + pandoc-onbuild: + target: pandoc--onbuild platforms: - linux/amd64 - - linux/arm/v7 - linux/arm64 + alias: + - $(VERSION)-pandoc-onbuild tests: hugo: command: version expected: hugo - node: - entrypoint: node - command: --version - asciidoctor: entrypoint: asciidoctor command: --version @@ -130,21 +112,4 @@ tests: pandoc: entrypoint: pandoc command: --version - expected: pandoc-default - - golang: - entrypoint: go - command: version - expected: go version - - yarn: - entrypoint: yarn - command: --version - - postcss: - entrypoint: postcss - command: --version - - rst2html: - entrypoint: rst2html - command: --version + expected: pandoc-default \ No newline at end of file diff --git a/src/files/_script/golang.sh b/src/files/_script/golang.sh index 52db7d13..0f645f62 100644 --- a/src/files/_script/golang.sh +++ b/src/files/_script/golang.sh @@ -6,7 +6,7 @@ set -e set -u # Variables -GOLANG_VERSION="1.22.2" +GOLANG_VERSION="1.22.4" # Architecture TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} diff --git a/src/files/_script/nodejs-glibc.sh b/src/files/_script/nodejs-glibc.sh index eb02e1ec..0570029e 100644 --- a/src/files/_script/nodejs-glibc.sh +++ b/src/files/_script/nodejs-glibc.sh @@ -6,7 +6,7 @@ set -e set -u # Variables -NODE_VERSION="21.7.3" +NODE_VERSION="22.3.0" # Architecture TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} diff --git a/src/files/_script/nodejs-musl.sh b/src/files/_script/nodejs-musl.sh index 0019bc35..6a4356c3 100644 --- a/src/files/_script/nodejs-musl.sh +++ b/src/files/_script/nodejs-musl.sh @@ -6,7 +6,7 @@ set -e set -u # Variables -NODE_VERSION="21.7.3" +NODE_VERSION="22.3.0" # Architecture TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} diff --git a/src/files/_script/pandoc.sh b/src/files/_script/pandoc.sh index 6ccc94ba..463471ea 100644 --- a/src/files/_script/pandoc.sh +++ b/src/files/_script/pandoc.sh @@ -6,7 +6,7 @@ set -e set -u # Variables -PANDOC_VERSION="3.1.13" +PANDOC_VERSION="3.2" # Architecture TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} From 8eb724b5cc24ade3a7bf066af610c58d3b9a3907 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 15:19:56 +0300 Subject: [PATCH 04/12] updated alpine image configs --- src/config/alpine-ext.yaml | 147 +++++++++++++++++++++---------------- src/config/alpine.yaml | 2 +- 2 files changed, 83 insertions(+), 66 deletions(-) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index a1987e57..eec40637 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -1,109 +1,109 @@ -name: Alpine (standard) +name: Alpine (extended) images: - # Alpine + Hugo - alpine: - target: alpine + # Alpine + Hugo extended + ext-alpine: + target: ext-alpine edge: true - platforms: - - linux/amd64 - - linux/arm/v7 - - linux/arm64 alias: - - $(VERSION)-alpine + - $(VERSION)-ext-alpine tests: - hugo - - # Alpine + Hugo + CI - alpine-ci: - target: alpine--ci + - golang + - node + - yarn + - postcss platforms: - linux/amd64 - - linux/arm/v7 - - linux/arm64 - alias: - - $(VERSION)-alpine-ci - # Alpine + Hugo + Onbuild - alpine-onbuild: - target: alpine--onbuild + # Alpine + Hugo extended + CI + ext-alpine-ci: + target: ext-alpine--ci + alias: + - $(VERSION)-ext-alpine-ci platforms: - linux/amd64 - - linux/arm/v7 - - linux/arm64 - alias: - - $(VERSION)-alpine-onbuild - # Alpine + Hugo + Asciidoctor - asciidoctor: - target: asciidoctor - edge: true + # Alpine + Hugo extended + Onbuild + ext-alpine-onbuild: + target: ext-alpine--onbuild + alias: + - $(VERSION)-ext-alpine-onbuild platforms: - linux/amd64 - - linux/arm/v7 - - linux/arm64 + + # Alpine + Hugo extended + Asciidoctor + ext-asciidoctor: + target: ext-asciidoctor alias: - - "$(VERSION)-asciidoctor" + - $(VERSION)-ext-asciidoctor tests: - hugo - asciidoctor - - # Alpine + Hugo + Asciidoctor + CI - asciidoctor-ci: - target: asciidoctor--ci + - golang + - node + - yarn + - postcss platforms: - linux/amd64 - - linux/arm/v7 - - linux/arm64 - alias: - - "$(VERSION)-asciidoctor-ci" - # Alpine + Hugo + Asciidoctor + Onbuild - asciidoctor-onbuild: - target: asciidoctor--onbuild + # Alpine + Hugo extended + Asciidoctor + CI + ext-asciidoctor-ci: + target: ext-asciidoctor--ci + alias: + - $(VERSION)-ext-asciidoctor-ci platforms: - linux/amd64 - - linux/arm/v7 - - linux/arm64 - alias: - - "$(VERSION)-asciidoctor-onbuild" - # Alpine + Hugo + Pandoc - pandoc: - target: pandoc - edge: true + # Alpine + Hugo extended + Asciidoctor + Onbuild + ext-asciidoctor-onbuild: + target: ext-asciidoctor--onbuild + alias: + - $(VERSION)-ext-asciidoctor-onbuild platforms: - linux/amd64 - - linux/arm64 + + # Alpine + Hugo extended + Pandoc + ext-pandoc: + target: ext-pandoc alias: - - $(VERSION)-pandoc + - $(VERSION)-ext-pandoc tests: - hugo - pandoc - - # Alpine + Hugo + Pandoc + CI - pandoc-ci: - target: pandoc--ci + - golang + - node + - yarn + - postcss + - rst2html platforms: - linux/amd64 - - linux/arm64 - alias: - - $(VERSION)-pandoc-ci - # Alpine + Hugo + Pandoc + Onbuild - pandoc-onbuild: - target: pandoc--onbuild + # Alpine + Hugo extended + Pandoc + CI + ext-pandoc-ci: + target: ext-pandoc--ci + alias: + - $(VERSION)-ext-pandoc-ci platforms: - linux/amd64 - - linux/arm64 + + # Alpine + Hugo extended + Pandoc + Onbuild + ext-pandoc-onbuild: + target: ext-pandoc--onbuild alias: - - $(VERSION)-pandoc-onbuild + - $(VERSION)-ext-pandoc-onbuild + platforms: + - linux/amd64 tests: hugo: command: version expected: hugo + node: + entrypoint: node + command: --version + asciidoctor: entrypoint: asciidoctor command: --version @@ -112,4 +112,21 @@ tests: pandoc: entrypoint: pandoc command: --version - expected: pandoc-default \ No newline at end of file + expected: pandoc-default + + golang: + entrypoint: go + command: version + expected: go version + + yarn: + entrypoint: yarn + command: --version + + postcss: + entrypoint: postcss + command: --version + + rst2html: + entrypoint: rst2html + command: --version \ No newline at end of file diff --git a/src/config/alpine.yaml b/src/config/alpine.yaml index 72b7f1ad..a1987e57 100644 --- a/src/config/alpine.yaml +++ b/src/config/alpine.yaml @@ -112,4 +112,4 @@ tests: pandoc: entrypoint: pandoc command: --version - expected: pandoc-default + expected: pandoc-default \ No newline at end of file From 6169c587fab961b6a396ccb6d86290778108d446 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 15:28:56 +0300 Subject: [PATCH 05/12] updated dependencies --- Makefile | 4 ++-- src/docker/_base/image.df | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index efa7f299..934e35d5 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ test: test-docsy test-docuapi test-docsy: @rm -rf target/test/docsy - @git clone -b v0.8.0 https://github.com/google/docsy.git target/test/docsy + @git clone -b v0.10.0 https://github.com/google/docsy.git target/test/docsy @docker run --rm -i -v $$(pwd)/target/test/docsy:/src -u $$(id -u) --entrypoint npm floryn90/hugo:ext-alpine install @docker run --rm -i -v $$(pwd)/target/test/docsy:/src -u $$(id -u) floryn90/hugo:ext-alpine @@ -46,7 +46,7 @@ bump: @RELEASE=$(version) bump src/bin/buildx: - @wget -q -O src/bin/buildx https://github.com/docker/buildx/releases/download/v0.14.0/buildx-v0.14.0.linux-amd64 + @wget -q -O src/bin/buildx https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64 @chmod a+x src/bin/buildx @docker buildx create --use diff --git a/src/docker/_base/image.df b/src/docker/_base/image.df index 287f3908..9635ec83 100644 --- a/src/docker/_base/image.df +++ b/src/docker/_base/image.df @@ -4,4 +4,4 @@ FROM busybox:latest AS busybox FROM debian:stable-slim AS debian -FROM ubuntu:rolling AS ubuntu \ No newline at end of file +FROM ubuntu:latest AS ubuntu \ No newline at end of file From b6cb6b5fa3734bd7e106dc087b4bb4e2e82503f5 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 15:39:22 +0300 Subject: [PATCH 06/12] arm64 support for alpine ext --- src/config/alpine-ext.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index eec40637..6976357d 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -15,6 +15,7 @@ images: - postcss platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + CI ext-alpine-ci: @@ -23,6 +24,7 @@ images: - $(VERSION)-ext-alpine-ci platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Onbuild ext-alpine-onbuild: @@ -31,6 +33,7 @@ images: - $(VERSION)-ext-alpine-onbuild platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor ext-asciidoctor: From 9b85a99643b383564f442b168899f600c59d3b3f Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:08:25 +0300 Subject: [PATCH 07/12] updates --- src/docker/_base/nodejs.df | 39 ++++++++------------------------ src/docker/debian-ext/Dockerfile | 2 +- src/docker/ubuntu-ext/Dockerfile | 2 +- 3 files changed, 12 insertions(+), 31 deletions(-) diff --git a/src/docker/_base/nodejs.df b/src/docker/_base/nodejs.df index fba02a35..2bdfd80d 100644 --- a/src/docker/_base/nodejs.df +++ b/src/docker/_base/nodejs.df @@ -1,29 +1,10 @@ -FROM base--image--alpine AS fetcher-glibc - -ARG TARGETPLATFORM - -ADD _script/nodejs-glibc.sh nodejs.sh -RUN sh nodejs.sh - - - -FROM scratch AS glibc - -COPY --from=fetcher-glibc /files / - - - - - -FROM base--image--alpine AS fetcher-musl - -ARG TARGETPLATFORM - -ADD _script/nodejs-musl.sh nodejs.sh -RUN sh nodejs.sh - - - -FROM scratch AS musl - -COPY --from=fetcher-musl /files / \ No newline at end of file +# Use the official Node.js Alpine image as the first stage +FROM node:latest AS node + +# Copy Node.js, npm, and yarn related files and directories from the first stage to the second stage +COPY --from=node /usr/lib /usr/lib # Libraries +COPY --from=node /usr/local/share /usr/local/share # Shared assets and data +COPY --from=node /usr/local/lib /usr/local/lib # More libraries +COPY --from=node /usr/local/include /usr/local/include # Header files +COPY --from=node /usr/local/bin /usr/local/bin # Binaries +COPY --from=node /opt /opt # Optional software packages \ No newline at end of file diff --git a/src/docker/debian-ext/Dockerfile b/src/docker/debian-ext/Dockerfile index 4876079f..1ff8695e 100644 --- a/src/docker/debian-ext/Dockerfile +++ b/src/docker/debian-ext/Dockerfile @@ -33,7 +33,7 @@ RUN true \ && apt install -y ca-certificates curl gnupg \ && mkdir -p /etc/apt/keyrings \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ && apt update \ && apt install nodejs -y \ # diff --git a/src/docker/ubuntu-ext/Dockerfile b/src/docker/ubuntu-ext/Dockerfile index ca9f89bc..cd01128e 100644 --- a/src/docker/ubuntu-ext/Dockerfile +++ b/src/docker/ubuntu-ext/Dockerfile @@ -33,7 +33,7 @@ RUN true \ && apt install -y ca-certificates curl gnupg \ && mkdir -p /etc/apt/keyrings \ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ && apt update \ && apt install nodejs -y \ # From 4403217a0bb859c34a9431046622bd9c0331518a Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:20:22 +0300 Subject: [PATCH 08/12] updates --- src/docker/_base/nodejs.df | 49 ++++++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/src/docker/_base/nodejs.df b/src/docker/_base/nodejs.df index 2bdfd80d..4b464517 100644 --- a/src/docker/_base/nodejs.df +++ b/src/docker/_base/nodejs.df @@ -1,10 +1,45 @@ +FROM base--image--alpine AS fetcher-glibc + +ARG TARGETPLATFORM + +ADD _script/nodejs-glibc.sh nodejs.sh +RUN sh nodejs.sh + + + +FROM scratch AS glibc + +COPY --from=fetcher-glibc /files / + + + + + +FROM base--image--alpine AS fetcher-musl + +ARG TARGETPLATFORM + +ADD _script/nodejs-musl.sh nodejs.sh +RUN sh nodejs.sh + + + +# FROM scratch AS musl + +# COPY --from=fetcher-musl /files / + + + # Use the official Node.js Alpine image as the first stage -FROM node:latest AS node +FROM node:latest-alpine AS node-base + +# Initialize the second stage with your custom image +FROM scratch AS musl # Copy Node.js, npm, and yarn related files and directories from the first stage to the second stage -COPY --from=node /usr/lib /usr/lib # Libraries -COPY --from=node /usr/local/share /usr/local/share # Shared assets and data -COPY --from=node /usr/local/lib /usr/local/lib # More libraries -COPY --from=node /usr/local/include /usr/local/include # Header files -COPY --from=node /usr/local/bin /usr/local/bin # Binaries -COPY --from=node /opt /opt # Optional software packages \ No newline at end of file +COPY --from=node-base /usr/lib /usr/lib # Libraries +COPY --from=node-base /usr/local/share /usr/local/share # Shared assets and data +COPY --from=node-base /usr/local/lib /usr/local/lib # More libraries +COPY --from=node-base /usr/local/include /usr/local/include # Header files +COPY --from=node-base /usr/local/bin /usr/local/bin # Binaries +COPY --from=node-base /opt /opt # Optional software packages \ No newline at end of file From 0d956f6768a303b3ab2d665406b2354db2da0f69 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:24:41 +0300 Subject: [PATCH 09/12] fix node tag --- src/docker/_base/nodejs.df | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker/_base/nodejs.df b/src/docker/_base/nodejs.df index 4b464517..907757c9 100644 --- a/src/docker/_base/nodejs.df +++ b/src/docker/_base/nodejs.df @@ -31,7 +31,7 @@ RUN sh nodejs.sh # Use the official Node.js Alpine image as the first stage -FROM node:latest-alpine AS node-base +FROM node:current-alpine AS node-base # Initialize the second stage with your custom image FROM scratch AS musl From 8d791bd3a97675472ba06ac6ed083b93cea15a23 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:33:51 +0300 Subject: [PATCH 10/12] updates --- src/docker/_base/nodejs.df | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/docker/_base/nodejs.df b/src/docker/_base/nodejs.df index 907757c9..efde3aed 100644 --- a/src/docker/_base/nodejs.df +++ b/src/docker/_base/nodejs.df @@ -1,32 +1,32 @@ -FROM base--image--alpine AS fetcher-glibc +# FROM base--image--alpine AS fetcher-glibc -ARG TARGETPLATFORM +# ARG TARGETPLATFORM -ADD _script/nodejs-glibc.sh nodejs.sh -RUN sh nodejs.sh +# ADD _script/nodejs-glibc.sh nodejs.sh +# RUN sh nodejs.sh -FROM scratch AS glibc +# FROM scratch AS glibc -COPY --from=fetcher-glibc /files / +# COPY --from=fetcher-glibc /files / -FROM base--image--alpine AS fetcher-musl +# FROM base--image--alpine AS fetcher-musl -ARG TARGETPLATFORM +# ARG TARGETPLATFORM -ADD _script/nodejs-musl.sh nodejs.sh -RUN sh nodejs.sh +# ADD _script/nodejs-musl.sh nodejs.sh +# RUN sh nodejs.sh -# FROM scratch AS musl +# # FROM scratch AS musl -# COPY --from=fetcher-musl /files / +# # COPY --from=fetcher-musl /files / @@ -37,9 +37,9 @@ FROM node:current-alpine AS node-base FROM scratch AS musl # Copy Node.js, npm, and yarn related files and directories from the first stage to the second stage -COPY --from=node-base /usr/lib /usr/lib # Libraries -COPY --from=node-base /usr/local/share /usr/local/share # Shared assets and data -COPY --from=node-base /usr/local/lib /usr/local/lib # More libraries -COPY --from=node-base /usr/local/include /usr/local/include # Header files -COPY --from=node-base /usr/local/bin /usr/local/bin # Binaries -COPY --from=node-base /opt /opt # Optional software packages \ No newline at end of file +COPY --from=node-base /usr/lib /usr/lib +COPY --from=node-base /usr/local/share /usr/local/share +COPY --from=node-base /usr/local/lib /usr/local/lib +COPY --from=node-base /usr/local/include /usr/local/include +COPY --from=node-base /usr/local/bin /usr/local/bin +COPY --from=node-base /opt /opt \ No newline at end of file From b739e0dab05982caca18728f5b2b2bbd8caeaad0 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:39:31 +0300 Subject: [PATCH 11/12] updates --- src/docker/alpine-ext/ext-alpine.df | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker/alpine-ext/ext-alpine.df b/src/docker/alpine-ext/ext-alpine.df index 176305ae..60963d56 100644 --- a/src/docker/alpine-ext/ext-alpine.df +++ b/src/docker/alpine-ext/ext-alpine.df @@ -31,7 +31,7 @@ COPY --from=image / / RUN true \ # # Install npm packages - && npm install -g autoprefixer postcss postcss-cli yarn @babel/cli @babel/core @fullhuman/postcss-purgecss \ + && npm install -g autoprefixer postcss postcss-cli @babel/cli @babel/core @fullhuman/postcss-purgecss \ # # Install rst2html && pip install --break-system-packages rst2html \ From da622ceb0947e62078e51ba97ecb1728ab343ab7 Mon Sep 17 00:00:00 2001 From: Florin Lungu Date: Sat, 22 Jun 2024 16:47:22 +0300 Subject: [PATCH 12/12] added build for arm64 platform --- src/config/alpine-ext.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/config/alpine-ext.yaml b/src/config/alpine-ext.yaml index 6976357d..ecb05684 100755 --- a/src/config/alpine-ext.yaml +++ b/src/config/alpine-ext.yaml @@ -49,6 +49,7 @@ images: - postcss platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor + CI ext-asciidoctor-ci: @@ -57,6 +58,7 @@ images: - $(VERSION)-ext-asciidoctor-ci platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Asciidoctor + Onbuild ext-asciidoctor-onbuild: @@ -65,6 +67,7 @@ images: - $(VERSION)-ext-asciidoctor-onbuild platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Pandoc ext-pandoc: @@ -81,6 +84,7 @@ images: - rst2html platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Pandoc + CI ext-pandoc-ci: @@ -89,6 +93,7 @@ images: - $(VERSION)-ext-pandoc-ci platforms: - linux/amd64 + - linux/arm64 # Alpine + Hugo extended + Pandoc + Onbuild ext-pandoc-onbuild: @@ -97,6 +102,7 @@ images: - $(VERSION)-ext-pandoc-onbuild platforms: - linux/amd64 + - linux/arm64 tests: hugo: