Skip to content

Commit

Permalink
build: build standard zgrab image as runner
Browse files Browse the repository at this point in the history
  • Loading branch information
developStorm committed May 20, 2024
1 parent ad5b3ca commit dc1454a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker-runner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ else
EXECUTABLE_EXTENSION :=
endif

all: service-base-image.id
PROJ_ROOT := $(shell git rev-parse --show-toplevel)

all: docker-runner.id service-base-image.id

.PHONY: clean clean-all base-apt-update

Expand All @@ -14,5 +16,11 @@ service-base-image.id: service-base.Dockerfile
base-apt-update:
IMAGE_ID=zgrab2_service_base:latest ./base-apt-update.sh

docker-runner.id: $(PROJ_ROOT)/Dockerfile
docker build -t zgrab2_runner:latest -f $(PROJ_ROOT)/Dockerfile -q $(PROJ_ROOT) > docker-runner.id || (rm -f docker-runner.id && exit 1)

clean:
if [ -f docker-runner.id ]; then docker rmi -f $$(cat docker-runner.id) && rm -f docker-runner.id; fi

clean-all: clean
if [ -f service-base-image.id ]; then docker rmi -f $$(cat service-base-image.id) && rm -f service-base-image.id; fi

0 comments on commit dc1454a

Please sign in to comment.