Conversation
|
Addressed all of the problems mentioned in the issue |
| @@ -1,3 +1,16 @@ | |||
| FROM php:7.2-apache as builder | |||
There was a problem hiding this comment.
We should use alpine, no need to use apache image here since it is bigger.
| @@ -1,3 +1,16 @@ | |||
| FROM php:7.2-apache as builder | |||
|
|
|||
There was a problem hiding this comment.
Add the same structure as ARG FLAG
| COPY flag ./flag | ||
| COPY src/ ./src/ |
There was a problem hiding this comment.
You don't need to copy the flag, copy only the file that has the flag and change it. Like flag-template.php to flag.php.
| @@ -1,20 +1,17 @@ | |||
| FILE := ../flag | |||
| FLAG := $(shell cat $(FILE)) | |||
| EXTERNAL_PORT := 8002 | |||
There was a problem hiding this comment.
Lets use EXTERNAL_PORT := 30100 for this one.
| FLAG := $(shell cat $(FILE)) | ||
| EXTERNAL_PORT := 8002 | ||
| INTERNAL_PORT := 80 | ||
| NAME := sss-web-08_todo-app |
There was a problem hiding this comment.
Lets name this one exotic-attacks_todo-app
| run: generate build | ||
| docker run -d -p 8002:80 --name sss-web-08_todo-app sss-web-08_todo-app | ||
| run: build | ||
| docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) $(NAME) |
There was a problem hiding this comment.
| docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) $(NAME) | |
| docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) -t $(NAME) |
| generate: | ||
| sed 's/__TEMPLATE__/$(FLAG)/g' ../src/flag-template.php > ../src/flag.php | ||
| build: | ||
| docker build -f Dockerfile -t $(NAME) .. |
There was a problem hiding this comment.
| docker build -f Dockerfile -t $(NAME) .. | |
| docker build --build-arg FLAG=$(FLAG) -t $(NAME) -f Dockerfile .. |
| docker stop $(NAME) | ||
|
|
||
| clean: stop | ||
| docker rm sss-web-08_todo-app | ||
| rm ../src/flag.php | ||
| docker rm $(NAME) |
There was a problem hiding this comment.
| docker stop $(NAME) | |
| clean: stop | |
| docker rm sss-web-08_todo-app | |
| rm ../src/flag.php | |
| docker rm $(NAME) | |
| clean: stop | |
| docker rm $(NAME) | |
| docker image rm $(NAME):latest |
|
|
||
| tolerations: [] | ||
|
|
||
| affinity: {} |
poli-gosha
left a comment
There was a problem hiding this comment.
Walked through all of them, hope to have solved them
Prerequisite Checklist
Description of changes