From 0369d55d791c8cef049d7d3d3038aaa60472fb67 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 12 Aug 2025 09:39:18 +0200 Subject: [PATCH] Move to chainguard/wolfi-base --- .gitignore | 2 ++ Dockerfile | 7 ++++--- air_gapped/Dockerfile | 45 ++++++++++++++++++++++++++++++++++++++++++- preview/git.js | 2 ++ 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f62a2b023b0f..48076a7c7c51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .gradle bin +.idea +.parcel-cache .includepath .ignorepath .settings diff --git a/Dockerfile b/Dockerfile index 8055b563d19d..f22264ae91df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,14 @@ # and takes longer to build but that is worth it. FROM bitnami/minideb:buster AS base -RUN echo "deb http://archive.debian.org/debian/ buster main" > /etc/apt/sources.list && \ - echo "deb http://archive.debian.org/debian-security/ buster/updates main" >> /etc/apt/sources.list +RUN install_packages apt-transport-https gnupg2 ca-certificates + +RUN echo "deb https://archive.debian.org/debian/ buster main" > /etc/apt/sources.list && \ + echo "deb https://archive.debian.org/debian-security/ buster/updates main" >> /etc/apt/sources.list # TODO install_packages calls apt-get update and then nukes the list files after. We should avoid multiple calls to apt-get update..... # We could probably fix this by running the update and installs ourself with `RUN --mount type=cache` but that is "experimental" -RUN install_packages apt-transport-https gnupg2 ca-certificates COPY .docker/apt/keys/nodesource.gpg / RUN apt-key add /nodesource.gpg COPY .docker/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/ diff --git a/air_gapped/Dockerfile b/air_gapped/Dockerfile index 928e47915d0f..89bc2cb54fdf 100644 --- a/air_gapped/Dockerfile +++ b/air_gapped/Dockerfile @@ -1,5 +1,48 @@ -FROM docker.elastic.co/docs/preview:latest +FROM docker.elastic.co/docs/preview:latest AS build COPY air_gapped/work/target_repo.git /docs_build/.repos/target_repo.git +FROM chainguard/wolfi-base:latest +#FROM perl:5.42-bookworm +RUN apk update +RUN apk add perl +RUN apk add curl +RUN apk add perl-app-cpanminus + +RUN apk add gcc make git patch perl-dev wget +RUN apk add openssl-dev +RUN apk add zlib-dev +RUN apk add perl-net-ssleay + +ENV PERL5LIB=/usr/local/lib/perl5 +ENV PATH=/usr/local/bin:$PATH + +WORKDIR / +RUN cpanm -n XML::LibXML +RUN cpanm -n File::Copy::Recursive +RUN cpanm -n Path::Class +RUN cpanm -n Parallel::ForkManager +RUN cpanm -n YAML +#RUN apt update -y +#RUN apt-get install -y perl +#RUN apt-get install -y nginx +#RUN apt-get install -y nodejs +#RUN apt-get install -y git + +#RUN apt-get install -y libxml-simple-perl +#RUN apt-get install -y libfile-copy-recursive-perl +#RUN apt-get install -y libpath-class-perl +#RUN apt-get install -y libcapture-tiny-perl +#RUN apt-get install -y libparallel-forkmanager-perl +#RUN apt-get install -y libyaml-perl + +RUN apk add nginx +RUN apk add nodejs + +COPY --from=build /docs_build /docs_build +COPY --from=build /node_modules /node_modules + +RUN adduser -D nginx +RUN mkdir -p /var/lib/nginx/tmp/ + CMD ["/docs_build/build_docs.pl", "--in_standard_docker", "--gapped", "--preview"] diff --git a/preview/git.js b/preview/git.js index 3f2664ba6119..b0b81a44de18 100644 --- a/preview/git.js +++ b/preview/git.js @@ -254,6 +254,8 @@ const toStringHandler = (resolve, reject, onMissing) => (err, stdout) => { if (err) { if (err.message.includes("Not a valid object name")) { onMissing("missing"); + } else if (err.message.includes("does not exist in")) { + onMissing("missing"); } else { reject(err); }