Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
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
2 changes: 1 addition & 1 deletion turms-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN cd ./turms-admin \
####################################################################
# Stage 1 : RUN
####################################################################
FROM nginx:1.28.0-alpine
FROM nginx:1.29.2-alpine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved security and build reproducibility, it is a best practice to pin Docker base images to their immutable digest (a SHA256 hash) instead of a mutable tag. While the 1.29.2-alpine tag is specific, it can theoretically be updated to point to a different image. Pinning to a digest ensures you are always using the exact same image, protecting against tag hijacking or unexpected updates.

You can obtain the digest for your image after pulling it and then update the FROM instruction. For example:

FROM nginx:1.29.2-alpine@sha256:<sha256-digest-of-the-image>

This practice helps guarantee deterministic builds.

COPY --from=builder /turms-admin/dist /usr/share/nginx/html

RUN echo ' \
Expand Down