From 809205d368a85e49ffed040153ddafb1f5aefd4a Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Sat, 7 Sep 2024 12:21:26 -0400 Subject: [PATCH] security: use pinned version of antora in package.json vs manual install of latest --- Dockerfile | 8 +++++--- Makefile | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0326d41..e6b2c29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ FROM node:20-alpine3.20@sha256:1a526b97cace6b4006256570efa1a29cd1fe4b96a5301f8d48e87c5139438a45 AS docs_stage -COPY . . -RUN npm i -g antora && antora antora-playbook.yml +WORKDIR /usr/app +COPY . /usr/app + +RUN npm i && node_modules/antora/bin/antora antora-playbook.yml FROM golang:1.22.6-alpine3.20@sha256:1a478681b671001b7f029f94b5016aed984a23ad99c707f6a0ab6563860ae2f3 AS build_stage COPY . . -COPY --from=docs_stage build/site internal/website/resources/ +COPY --from=docs_stage /usr/app/build/site internal/website/resources/ RUN ls -hal internal/website/resources/ RUN apk update && \ diff --git a/Makefile b/Makefile index a68a94f..c4a6746 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ lint: @golangci-lint run --fix -E asciicheck,bidichk,bodyclose,canonicalheader,dogsled,dupl,exhaustive,gocheckcompilerdirectives,gocritic,gofmt,durationcheck,errname,errorlint,fatcontext,goheader,inamedparam,interfacebloat,intrange,maintidx,makezero,mirror,misspell,mnd,noctx,nonamedreturns,perfsprint,prealloc,predeclared,revive,stylecheck,tenv,testifylint,usestdlibvars,unconvert,wastedassign docs: - @npm i antora + @npm i @node_modules/antora/bin/antora antora-playbook.yml @cp -r build/site/* internal/website/resources/