Skip to content

Commit

Permalink
ADD : added a makefile to automate building and running the containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguar-ks committed Oct 14, 2024
1 parent b8f7251 commit 82dae9a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
images=$(shell docker image ls -aq)

all: build

build:
docker-compose -f docker-compose.yml build

up: build
docker-compose -f docker-compose.yml up

down:
docker-compose -f docker-compose.yml down

delete_images:
if [ -n "$(images)" ];\
then docker rmi $(images);\
else\
echo "No images to delete";\
fi

fclean: down delete_images
docker system prune -a --force

.PHONY: all build up down delete_images fclean

.SILENT: all build up down delete_images fclean

0 comments on commit 82dae9a

Please sign in to comment.