Files
drb-client-discord-bot/Makefile
2025-01-25 02:31:27 -05:00

38 lines
796 B
Makefile

# Path to the Docker context directory
SDR_NODE_CONTEXT = $(shell pwd)
# Path to the .env file
ENV_FILE = $(SDR_NODE_CONTEXT)/.env
# Variables
IMAGE_NAME = client-bot
CONTAINER_NAME = client-bot
# Target to build the Docker image for sdr-node
build:
docker build -t $(IMAGE_NAME) $(SDR_NODE_CONTEXT)
# Target to run the sdr-node container
run: build
docker run --rm -it \
--privileged \
-v /dev:/dev \
-v $(shell pwd)/configs:/configs \
-v $(shell pwd)/app:/app \
--name $(CONTAINER_NAME) \
--network=host \
$(IMAGE_NAME)
# Stop the Docker container
stop:
docker stop $(CONTAINER_NAME)
# Remove the Docker container
remove:
docker rm $(CONTAINER_NAME)
# Clean up (stop and remove the container)
clean: stop remove
# Rebuild the Docker image
rebuild: clean build