Update docker building (#961)

* Remove old entry and dependencies from Makefile
* Update Dockerfiles to only COPY needed files for faster builds and better caching
* Test the docker files getting built from the Makefile in CI
This commit is contained in:
Aram Akhavan
2026-03-14 22:11:33 -07:00
committed by GitHub
parent 0aea6b96ca
commit 6cc9ff7fc5
5 changed files with 41 additions and 50 deletions
+6 -2
View File
@@ -6,7 +6,8 @@
######## Build the frontend
FROM --platform=${BUILDPLATFORM} node AS frontendbuild
WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /go/src/github.com/analogj/scrutiny
COPY --link Makefile /go/src/github.com/analogj/scrutiny/
COPY --link webapp/frontend /go/src/github.com/analogj/scrutiny/webapp/frontend
RUN make binary-frontend
@@ -14,7 +15,10 @@ RUN make binary-frontend
FROM golang:1.25-trixie as backendbuild
WORKDIR /go/src/github.com/analogj/scrutiny
COPY --link . /go/src/github.com/analogj/scrutiny
COPY --link Makefile /go/src/github.com/analogj/scrutiny/
COPY --link go.mod go.sum /go/src/github.com/analogj/scrutiny/
COPY --link collector /go/src/github.com/analogj/scrutiny/collector
COPY --link webapp/backend /go/src/github.com/analogj/scrutiny/webapp/backend
RUN apt-get update && apt-get install -y file && rm -rf /var/lib/apt/lists/*
RUN make binary-clean binary-all WEB_BINARY_NAME=scrutiny