Skip to content

Commit 251aff0

Browse files
committed
build(postgres): fix makefile to avoid layer accumulation
1 parent bc8d79b commit 251aff0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker/Makefile.postgresql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ postgres-docker-shell:
238238
# Build CloudSync into the Supabase CLI postgres image tag
239239
postgres-supabase-build:
240240
@echo "Building CloudSync image for Supabase CLI..."
241-
@tmp_dockerfile="$$(mktemp /tmp/cloudsync-supabase-cli.XXXXXX)"; \
241+
@tmp_dockerfile="$$(mktemp ./cloudsync-supabase-cli.XXXXXX)"; \
242242
src_dockerfile="$(SUPABASE_CLI_DOCKERFILE)"; \
243243
supabase_cli_image="$(SUPABASE_CLI_IMAGE)"; \
244244
if [ -z "$$supabase_cli_image" ]; then \
@@ -267,6 +267,8 @@ postgres-supabase-build:
267267
exit 1; \
268268
fi; \
269269
echo "Using base image: $$supabase_cli_image"; \
270+
echo "Pulling fresh base image to avoid layer accumulation..."; \
271+
docker pull "$$supabase_cli_image" 2>/dev/null || true; \
270272
docker build --build-arg SUPABASE_POSTGRES_TAG="$(SUPABASE_POSTGRES_TAG)" -f "$$tmp_dockerfile" -t "$$supabase_cli_image" .; \
271273
rm -f "$$tmp_dockerfile"; \
272274
echo "Build complete: $$supabase_cli_image"

0 commit comments

Comments
 (0)