Skip to content
Snippets Groups Projects
Commit 0ca0f558 authored by Saleh.Bauch's avatar Saleh.Bauch
Browse files

multi-stage

parent 7dd62d27
Branches main
No related tags found
No related merge requests found
FROM node:slim as build-stage
WORKDIR /app
COPY . .
RUN npm install
RUN npm run build
FROM node:alpine as run-stage
WORKDIR /app
COPY --from=build-stage /app/dist/index.js /app/dist/
COPY --from=build-stage /app/package*.json ./
RUN npm install --omit=dev
EXPOSE 3000
CMD ["node", "dist/index.js"]
\ No newline at end of file
This diff is collapsed.
......@@ -9,7 +9,8 @@
"description": "A simple HTTP server in TypeScript",
"main": "dist/index.js",
"dependencies": {
"express": "^4.18.2"
"express": "^4.18.2",
"pkg": "^5.8.1"
},
"scripts": {
"build": "tsc",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment