Refactor Docker setup and replace web files with new structure

This commit is contained in:
Lukian 2025-01-21 08:39:08 +01:00
parent 2e2ec0885c
commit f1d2a93752
5 changed files with 18 additions and 13 deletions

View file

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

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Serveur Web - Honnete</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Page d'accueil</h1>
<p>Le serveur web est honnête.</p>
</body>
</html>

View file

@ -0,0 +1,5 @@
body {
background-color: salmon;
align-content: center;
text-align: center;
}

View file

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