Modification dockerfile
This commit is contained in:
parent
865127a0a9
commit
19da13310d
4 changed files with 14 additions and 12 deletions
|
@ -1,11 +1,13 @@
|
||||||
services:
|
services:
|
||||||
webserver:
|
webserver:
|
||||||
|
dockerfile: docker/apache2/dockerfile
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/code
|
- .:/code
|
||||||
attacker:
|
attacker:
|
||||||
|
dockerfile: docker/attacker/dockerfile
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "5001:5001"
|
- "5001:5001"
|
||||||
|
|
8
docker/apache2/dockerfile
Normal file
8
docker/apache2/dockerfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
FROM ubuntu:lastest AS webserver
|
||||||
|
RUN apt-get update && apt-get install -y apache2
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
COPY ./public/ .
|
||||||
|
|
||||||
|
|
||||||
|
CMD ["apache2ctl", "-D", "FOREGROUND"]
|
4
docker/attacker/dockerfile
Normal file
4
docker/attacker/dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM alpine:latest AS attacker
|
||||||
|
RUN apk add --no-cache curl
|
||||||
|
|
||||||
|
CMD ["curl", "webserver:80"]
|
12
dockerfile
12
dockerfile
|
@ -1,12 +0,0 @@
|
||||||
FROM ubuntu:lastest AS webserver
|
|
||||||
RUN apt-get update && apt-get install -y apache2
|
|
||||||
|
|
||||||
WORKDIR /var/www/html
|
|
||||||
COPY ./public/ .
|
|
||||||
|
|
||||||
CMD ["apache2ctl", "-D", "FOREGROUND"]
|
|
||||||
|
|
||||||
FROM alpine:latest AS attacker
|
|
||||||
RUN apk add --no-cache curl
|
|
||||||
|
|
||||||
CMD ["curl", "webserver:80"]
|
|
Loading…
Add table
Add a link
Reference in a new issue