Skip to content

Commit

Permalink
fix: clean before build, print cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Dec 9, 2024
1 parent 0d6e21a commit 1df3a72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions transport-interop/impl/js/v2.x/Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
image_name := js-v2.x

# TODO Enable webkit once https://github.com/libp2p/js-libp2p/pull/1627 is in
all: image.json chromium-image.json firefox-image.json update-lock-file
all: clean image.json chromium-image.json firefox-image.json update-lock-file

# Necessary because multistage builds require a docker image name rather than a digest to be used
load-image-json: image.json
docker image tag $$(jq -r .imageID image.json) ${image_name}

chromium-image.json: load-image-json BrowserDockerfile
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
docker build --no-cache --progress=plain -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=chromium -t chromium-${image_name} .
docker image inspect chromium-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

firefox-image.json: load-image-json BrowserDockerfile
docker build -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
docker build --no-cache --progress=plain -f BrowserDockerfile --build-arg=BASE_IMAGE=${image_name} --build-arg=BROWSER=firefox -t firefox-${image_name} .
docker image inspect firefox-${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

Expand All @@ -25,7 +25,8 @@ update-lock-file: image.json
docker rm $$CONTAINER_ID

image.json:
docker build -t ${image_name} -f ./Dockerfile .
echo $(CURDIR)
docker build --no-cache --progress=plain -t ${image_name} -f ./Dockerfile .
docker image inspect ${image_name} -f "{{.Id}}" | \
xargs -I {} echo "{\"imageID\": \"{}\"}" > $@

Expand Down

0 comments on commit 1df3a72

Please sign in to comment.