Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 7b28b17

Browse files
authored
Fix container build so make push will work again (#58)
1 parent 5a7c73d commit 7b28b17

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

makefile_components/base_container.mak

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ SANITIZED_DOCKER_REPO = $(subst /,_,$(DOCKER_REPO))
88

99
DOTFILE_IMAGE = $(subst /,_,$(IMAGE))-$(VERSION)
1010

11-
container: $(wildcard Dockerfile*)
11+
container: .container-$(DOTFILE_IMAGE) container-name
12+
13+
.container-$(DOTFILE_IMAGE): $(wildcard Dockerfile Dockerfile.in) container-name
1214
# UPSTREAM_REPO in the Dockerfile.in will be changed to the value from Makefile; this is deprecated.
1315
# There's no reason not to just use Dockerfile now.
1416
@if [ -f Dockerfile.in ]; then sed -e 's|UPSTREAM_REPO|$(UPSTREAM_REPO)|g' Dockerfile.in > .dockerfile; else cp Dockerfile .dockerfile; fi
@@ -17,8 +19,7 @@ container: $(wildcard Dockerfile*)
1719
# Add the .docker_image into the build so it's easy to figure out where a docker image came from.
1820
@echo "ADD .docker_image /$(SANITIZED_DOCKER_REPO)_VERSION_INFO.txt" >>.dockerfile
1921
docker build -t $(DOCKER_REPO):$(VERSION) $(DOCKER_ARGS) -f .dockerfile .
20-
@docker images -q $(DOCKER_REPO):$(VERSION) >/dev/null
21-
22+
@docker images -q $(DOCKER_REPO):$(VERSION) >$@
2223

2324
container-name:
2425
@echo "container: $(DOCKER_REPO):$(VERSION)"

tests/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM alpine
2+
3+
RUN apk update && apk add git
4+
5+
# This is a dummy Dockerfile

tests/Dockerfile.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)