diff --git a/Dockerfile b/Dockerfile index 23258e6..2f3b2b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,18 +6,14 @@ COPY . /app RUN make -C /app fclean custom ARG="-static -O3" -#FROM alpine:latest AS production-stage -FROM alpine:latest AS production-stage +RUN mkdir -p /etc/webserv/sites-enabled + +FROM gcr.io/distroless/static-debian12:latest AS production-stage COPY --from=build-stage /app/bin/webserv /usr/bin/webserv COPY --from=build-stage /app/conf/webserv.conf /etc/webserv/ COPY --from=build-stage /app/conf/mime.types /etc/webserv/ -COPY --from=build-stage /app/conf/sites-available/default.conf /etc/webserv/sites-available/ - -RUN mkdir /etc/webserv/sites-enabled -RUN ln -s /etc/webserv/sites-available/default.conf /etc/webserv/sites-enabled/ - -RUN mkdir -p /var/www/html +COPY --from=build-stage /app/conf/sites-available/default.conf /etc/webserv/sites-enabled/ COPY --from=build-stage /app/websites/default/index.html /usr/share/webserv/html/ EXPOSE 80