Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
FROM docker.io/node:24-alpine3.20
FROM docker.io/node:26-alpine3.24

LABEL org.opencontainers.image.authors="Said Sef <saidsef@gmail.com> (saidsef.co.uk/)"
LABEL org.opencontainers.image.title="Node Application Web Server"
LABEL org.opencontainers.image.description="This is used to test container platform builds such as Kubernetes and other container schedulers."

LABEL maintainer="Said Sef <saidsef@gmail.com> (saidsef.co.uk/)"

ARG BUILD_ID=""
ARG PORT=""

ENV NODE_ENV production
ENV NPM_CONFIG_FETCH_RETRIES 10
ENV NPM_CONFIG_LOGLEVEL warn
ENV BUILD_ID ${BUILD_ID:-'0.0.0.0-boo!'}
ENV PORT ${PORT:-8080}
ENV NODE_ENV=production
ENV NPM_CONFIG_FETCH_RETRIES=10
ENV NPM_CONFIG_LOGLEVEL=warn
ENV BUILD_ID=${BUILD_ID:-'0.0.0.0-boo!'}
ENV PORT=${PORT:-8080}

WORKDIR /code
COPY ./app/ /code

RUN echo "${BUILD_ID}" > build_id.txt
RUN apk add --update --no-cache curl && \
rm -rfv /var/cache/apk/* && \
yarn install --prod && \
yarn check && \
yarn autoclean --init && \
yarn autoclean --force && \
npm install --omit=dev --no-audit --no-fund && \
npm cache clean --force && \
chown -R nobody .

USER nobody

EXPOSE ${PORT}

# health check endpoint
HEALTHCHECK --interval=60s --timeout=10s CMD curl --fail 'http://localhost:${PORT}/healthz' || exit 1

CMD /usr/local/bin/node index.js

Check warning on line 33 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
File renamed without changes.