Skip to content

Commit

Permalink
Demo prep
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesir87 committed Jan 24, 2025
1 parent 22b87e4 commit 0881a10
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 378 deletions.
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 @@ COPY --chown=appuser:appuser package.json package-lock.json ./
# 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 @@ CMD ["yarn", "dev-container"]
# 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

0 comments on commit 0881a10

Please sign in to comment.