Skip to content

Commit 9c96857

Browse files
authored
fix: correct build context for dotnet8-builder Docker image (#427)
1 parent f9bb405 commit 9c96857

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

dotnet8/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ dotnet8-env-img: Dockerfile
1111
docker build --platform=$(PLATFORMS) -t $(REPO)/dotnet8-env:$(TAG) -f $< .
1212

1313
dotnet8-builder-img: builder/Dockerfile
14-
@echo === Building image $(REPO)/dotnet8-builder:$(TAG) using context $(CURDIR)/builder and dockerfile $<
15-
docker build --platform=$(PLATFORMS) -t $(REPO)/dotnet8-builder:$(TAG) -f $< builder/
14+
@echo === Building image $(REPO)/dotnet8-builder:$(TAG) using context $(CURDIR) and dockerfile $<
15+
docker build --platform=$(PLATFORMS) -t $(REPO)/dotnet8-builder:$(TAG) -f $< .

dotnet8/builder/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ PLATFORMS ?= linux/amd64,linux/arm64
55
.PHONY: all
66
all: dotnet8-builder-img
77

8-
dotnet8-builder-img: Dockerfile
8+
# Override the rule to use parent directory as context
9+
dotnet8-builder-img: Dockerfile
10+
@echo === Building image $(REPO)/dotnet8-builder:$(TAG) using parent directory as context
11+
cd .. && docker buildx build --platform=$(PLATFORMS) -t $(REPO)/dotnet8-builder:$(TAG) $(DOCKER_FLAGS) -f builder/Dockerfile .

0 commit comments

Comments
 (0)