-
-
Save 9oelM/a0708ef80b15f6c396a99810aacf0a7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazon/aws-lambda-nodejs:14 AS builder | |
WORKDIR /usr/app | |
COPY package*.json tsconfig.json ./ | |
RUN npm install | |
COPY ./lib ./lib/ | |
RUN npm run build | |
RUN ls -la # for debugging | |
FROM amazon/aws-lambda-nodejs:14 | |
# CMD ["path-to-file.function-name"] | |
WORKDIR /usr/app | |
COPY package*.json ./ | |
RUN npm install --only=prod | |
COPY --from=builder /usr/app/lib /usr/app/lib | |
CMD [ "/usr/app/lib/index.handler" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment