Switch base image from Ubuntu to Debian slim and clean up APT lists in Dockerfile

This commit is contained in:
Lukian 2025-01-21 09:04:32 +01:00
parent fda4c4376e
commit 8c390faac4

View file

@ -1,7 +1,6 @@
FROM ubuntu:lastest AS webserver
FROM debian:stable-slim
RUN apt-get update && apt-get install -y apache2 openssl ca-certificates \
&& openssl req -nodes -newkey rsa:2048 -sha256 -keyout private-rsa.key -out certifactes.csr \
rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html
COPY ./public/ .
CMD ["apache2ctl", "-D", "FOREGROUND"]