add port to Makefile

This commit is contained in:
agatha 2024-04-13 21:09:13 -04:00
parent 4962cc0920
commit c8539af605

View File

@ -1,10 +1,11 @@
IMAGE_NAME=unshortener-api IMAGE_NAME=unshortener-api
CONTAINER_NAME=unshortener CONTAINER_NAME=unshortener
CONTAINER_PORT=8000
build: build:
docker build -t $(IMAGE_NAME) . docker build -t $(IMAGE_NAME) .
run: run:
docker run --name $(CONTAINER_NAME) -d $(IMAGE_NAME) docker run --name $(CONTAINER_NAME) -d -p $(CONTAINER_PORT):8000 $(IMAGE_NAME)
stop: stop:
docker stop $(CONTAINER_NAME) docker stop $(CONTAINER_NAME)
clean: clean: