Skip to content

Commit 551af27

Browse files
committed
Fix: Replace external nginx:alpine with MCR-approved base image for SDL compliance
1 parent 221ff6a commit 551af27

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

Dockerfile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,19 @@ COPY . .
1616
RUN npm install
1717
RUN npm run build
1818

19-
FROM nginx:alpine
20-
COPY --from=build /build/out /usr/share/nginx/html
19+
FROM mcr.microsoft.com/azurelinux/base/core:3.0
20+
21+
# Install nginx
22+
RUN tdnf install -y nginx --quiet && tdnf clean all
23+
24+
WORKDIR /usr/share/nginx/html
25+
COPY --from=build /build/out .
26+
27+
# Configure nginx
28+
RUN chmod -R 755 /usr/share/nginx/html
29+
30+
EXPOSE 80
31+
HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
32+
CMD curl -f http://localhost/ || exit 1
33+
34+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)