Init push
This commit is contained in:
17
Makefile
Normal file
17
Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
# Define variables for server image name
|
||||
SERVER_IMAGE = websocket-server-app
|
||||
SERVER_CONTAINER_NAME = websocket-server # Give the server a fixed name
|
||||
|
||||
# Default target: build the server image
|
||||
all: build
|
||||
|
||||
# Target to build the server Docker image
|
||||
build:
|
||||
docker build -t $(SERVER_IMAGE) .
|
||||
|
||||
# Target to run the server container using the host network
|
||||
run: build
|
||||
docker run -it --rm \
|
||||
--name $(SERVER_CONTAINER_NAME) \
|
||||
--network host \
|
||||
$(SERVER_IMAGE)
|
||||
Reference in New Issue
Block a user