NAME:=chatgptplugins DOCKER_REPOSITORY:=dsatya6 VERSION:=v1 DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME):$(VERSION) .PHONY: build clean test build-container push-container test-container build : python app/main.py clean : @echo "" test: python app/main.py build-container : @docker build $(grep -v '^#' dot_env | sed 's/^/--build-arg /') -t $(DOCKER_IMAGE_NAME) --no-cache --progress plain . push-container : @docker push $(DOCKER_IMAGE_NAME) test-container : @docker rm -f $(DOCKER_IMAGE_NAME) || true # python server is running a 5000, map to docker 5000 @docker run -dp 5082:5082 --name=$(NAME) $(DOCKER_IMAGE_NAME) @docker ps @sleep 5 @curl http://localhost:5082/ @echo "" @sleep 2 @curl http://localhost:5082/openapi.yaml @echo "" @sleep 2 @curl http://localhost:5082/.well-known/ai-plugin.json @echo "" @sleep 2 @docker stop $(NAME) || true @docker rm -f $(NAME) || true%