Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down