Refactor Docker setup and replace web files with new structure
This commit is contained in:
parent
2e2ec0885c
commit
f1d2a93752
5 changed files with 18 additions and 13 deletions
20
compose.yml
20
compose.yml
|
@ -1,16 +1,22 @@
|
|||
services:
|
||||
webserver:
|
||||
dockerfile: docker/apache2/dockerfile
|
||||
build: .
|
||||
build: docker/apache2
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- 5000:5000
|
||||
- 80:80
|
||||
volumes:
|
||||
- .:/code
|
||||
networks:
|
||||
- mynetwork
|
||||
attacker:
|
||||
dockerfile: docker/attacker/dockerfile
|
||||
build: .
|
||||
build: docker/attacker
|
||||
ports:
|
||||
- "5001:5001"
|
||||
- 5001:5001
|
||||
volumes:
|
||||
- .:/code
|
||||
|
||||
networks:
|
||||
- mynetwork
|
||||
|
||||
networks:
|
||||
mynetwork:
|
||||
external: false
|
|
@ -1,8 +1,7 @@
|
|||
FROM ubuntu:lastest AS webserver
|
||||
RUN apt-get update && apt-get install -y apache2
|
||||
|
||||
FROM debian:stable-slim
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y apache2 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /var/www/html
|
||||
COPY ./public/ .
|
||||
|
||||
|
||||
CMD ["apache2ctl", "-D", "FOREGROUND"]
|
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:latest AS attacker
|
||||
FROM alpine:latest
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
CMD ["curl", "webserver:80"]
|
Loading…
Add table
Add a link
Reference in a new issue