forked from nodeshift-starters/devfile-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 635 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 635 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Install the app dependencies in a full Node docker image
FROM registry.access.redhat.com/ubi8/nodejs-16:latest
# Copy package.json, and optionally package-lock.json if it exists
COPY package.json package-lock.json* ./
# Install app dependencies
RUN \
if [ -f package-lock.json ]; then npm ci; \
else npm install; \
fi
# Copy the dependencies into a Slim Node docker image
FROM registry.access.redhat.com/ubi8/nodejs-16-minimal:latest
# Install app dependencies
COPY --from=0 /opt/app-root/src/node_modules /opt/app-root/src/node_modules
COPY . /opt/app-root/src
ENV NODE_ENV production
ENV PORT 3001
CMD ["npm", "start"]