From 8c1eb492229eb9260b1efc3c98b00c186a6b1c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Thu, 4 Jun 2026 16:26:57 +0200 Subject: [PATCH] docker: provide test image with source --- Makefile | 3 +++ docker/test.Dockerfile | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 docker/test.Dockerfile diff --git a/Makefile b/Makefile index ab3f4e3d..96f44f4a 100644 --- a/Makefile +++ b/Makefile @@ -182,6 +182,9 @@ binaries: prepare swagger ## Build binary releases (FreeBSD, macOS, Linux gener docker-image: ## Build aptly-dev docker image @docker build -f system/Dockerfile . -t aptly-dev +docker-image-test: # Build aptly-test docker image for testing + @docker build -f docker/test.Dockerfile . -t aptly-test + docker-image-no-cache: ## Build aptly-dev docker image (no cache) @docker build --no-cache -f system/Dockerfile . -t aptly-dev diff --git a/docker/test.Dockerfile b/docker/test.Dockerfile new file mode 100644 index 00000000..4ba65782 --- /dev/null +++ b/docker/test.Dockerfile @@ -0,0 +1,7 @@ +FROM aptly-dev + +ADD --chown=aptly:aptly . /work/src/ + +# Pre-populate the Go module cache so go mod verify works offline +RUN chown aptly /work/src && mkdir -p /work/src/.go && chown aptly /work/src/.go && \ + cd /work/src && sudo -u aptly GOPATH=/work/src/.go GOCACHE=/work/src/.go/cache go mod download