Skip to content

Commit

Permalink
Correct containerisation
Browse files Browse the repository at this point in the history
  • Loading branch information
willsawyerrrr committed Dec 21, 2023
1 parent feb4f46 commit 50730ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM public.ecr.aws/lambda/nodejs:20 as build-image

WORKDIR /usr/app

COPY package.json package-lock.json tsconfig.json index.ts ./
COPY package.json package-lock.json tsconfig.json ./
COPY src/index.ts ./src/

RUN npm clean-install
RUN npm run build
Expand All @@ -11,6 +12,8 @@ FROM public.ecr.aws/lambda/nodejs:20

WORKDIR ${LAMBDA_TASK_ROOT}

COPY --from=build-image /usr/app/dist/* ./
COPY --from=build-image /usr/app/dist/index.js ./

RUN npm clean-install --omit dev

CMD ["index.handler"]
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"module": "NodeNext",
"outDir": "dist",
"strict": true,
"target": "ES6"
},
Expand Down

0 comments on commit 50730ac

Please sign in to comment.