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

SHARD-901 - update Dockerfile base image from node:16 to node:18.19.1 and add .do… #23

Merged
merged 2 commits into from
Dec 5, 2024
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
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.dockerignore
.env
.git
.github
.gitignore
.pm2
Dockerfile
docker-compose.yml
npm-debug.log
README.md
build
dist
.next
node_modules
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Node.js LTS 10.x.x from Docker Hub
FROM node:16
FROM node:18.19.1

# Create app directory
WORKDIR /usr/src/app
Expand All @@ -8,7 +8,7 @@ WORKDIR /usr/src/app
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# RUN npm install
RUN npm install

# Bundle app source
COPY . .
Expand All @@ -17,6 +17,5 @@ COPY . .
# Note: ports can be exposed at runtime too with --expose or -p <port>:<port>
EXPOSE 3000

RUN npm run compile
# Define run command
CMD [ "node", "build/src/server.js" ]
Loading