Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not merge - Validation test #37

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# By using this stage, it provides a consistent base for both
# the dev and prod versions of the image.
###########################################################
FROM node:22-slim AS base
FROM node:18 AS base

# Setup a non-root user to run the app
WORKDIR /usr/local/app
Expand All @@ -23,9 +23,9 @@
# and automatically restart the app.
###########################################################
FROM base AS dev
ENV NODE_ENV=development
ENV NODE_ENV development
RUN npm install
CMD ["yarn", "dev-container"]
CMD ["npm", "run", "dev-container"]


###########################################################
Expand All @@ -35,10 +35,10 @@
# installs only the production dependencies.
###########################################################
FROM base AS final
ENV NODE_ENV=production
ENV NODE_ENV production

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

Check warning on line 38 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push image

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
RUN npm ci --production --ignore-scripts && npm cache clean --force
COPY ./src ./src

EXPOSE 3000

CMD [ "node", "src/index.js" ]
CMD node src/index.js

Check warning on line 44 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push image

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/

Check warning on line 44 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build and push image

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/
Loading
Loading