Skip to content

Commit b4982cd

Browse files
committed
Add docker standalone makefile rules
1 parent 579c08f commit b4982cd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ custom:
111111
run: all
112112
$(BIN_DIR)/$(NAME) $(CONF_DIR)/$(CONF)
113113

114+
docker.build:
115+
docker build -t webserv .
116+
117+
docker.run:
118+
docker run --rm -p 8080:8080 --name webserv webserv:latest
119+
114120
lines:
115121
@wc -l $(SRC_DIR)/*.cpp $(INC_DIR)/*.hpp $(SRC_DIR)/*/*.cpp $(INC_DIR)/*/*.hpp | sort
116122

@@ -124,6 +130,8 @@ help:
124130
@echo " debug : Build with debugging symbols (-g)"
125131
@echo " custom : Build with custom CXXFLAGS (e.g., ARG='-DDEBUG')"
126132
@echo " run : Run webserv binary with project configuration file"
133+
@echo " docker.build : Build webserv docker image"
134+
@echo " docker.run : Run webserv docker image"
127135
@echo " lines : Count lines of code in source files"
128136

129137
.PHONY: all clean fclean re performance debug fsanitize custom flamegraph jmeter lines help

0 commit comments

Comments
 (0)