Fix Dockerfile
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,6 +1,10 @@
|
|||||||
FROM node:22.4-slim
|
FROM node:22.4-slim AS build
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
COPY ./package.json ./package-lock.json .
|
COPY . /work
|
||||||
RUN npm install
|
RUN npm ci && npm run build
|
||||||
COPY ./ .
|
|
||||||
CMD ["npx", "ts-node", "index.ts"]
|
FROM gcr.io/distroless/nodejs22-debian12
|
||||||
|
WORKDIR /work
|
||||||
|
COPY --from=build /work /work
|
||||||
|
|
||||||
|
CMD ["index.js"]
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "ts-node index.ts"
|
"test": "ts-node index.ts",
|
||||||
|
"build": "npx tsc --build",
|
||||||
|
"clean": "npx tsc --build --clean"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user