Modification dockerfile

This commit is contained in:
iMax 2025-01-21 08:29:32 +01:00
parent 865127a0a9
commit 19da13310d
4 changed files with 14 additions and 12 deletions

View file

@ -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"

View 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"]

View file

@ -0,0 +1,4 @@
FROM alpine:latest AS attacker
RUN apk add --no-cache curl
CMD ["curl", "webserver:80"]

View file

@ -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"]