Skip to content

Commit 34ce1b2

Browse files
Merge pull request #50 from PythonGermany/distroless-image
Simplify dockerfile and use distroless image
2 parents 02da97c + 158237b commit 34ce1b2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,14 @@ COPY . /app
66

77
RUN make -C /app fclean custom ARG="-static -O3"
88

9-
#FROM alpine:latest AS production-stage
10-
FROM alpine:latest AS production-stage
9+
RUN mkdir -p /etc/webserv/sites-enabled
10+
11+
FROM gcr.io/distroless/static-debian12:latest AS production-stage
1112

1213
COPY --from=build-stage /app/bin/webserv /usr/bin/webserv
1314
COPY --from=build-stage /app/conf/webserv.conf /etc/webserv/
1415
COPY --from=build-stage /app/conf/mime.types /etc/webserv/
15-
COPY --from=build-stage /app/conf/sites-available/default.conf /etc/webserv/sites-available/
16-
17-
RUN mkdir /etc/webserv/sites-enabled
18-
RUN ln -s /etc/webserv/sites-available/default.conf /etc/webserv/sites-enabled/
19-
20-
RUN mkdir -p /var/www/html
16+
COPY --from=build-stage /app/conf/sites-available/default.conf /etc/webserv/sites-enabled/
2117
COPY --from=build-stage /app/websites/default/index.html /usr/share/webserv/html/
2218

2319
EXPOSE 80

0 commit comments

Comments
 (0)