Skip to content

Instantly share code, notes, and snippets.

@kalinchernev
Created September 3, 2018 11:30
Show Gist options
  • Save kalinchernev/504d5edb7ab828f8b3bafd586133f4ae to your computer and use it in GitHub Desktop.
Save kalinchernev/504d5edb7ab828f8b3bafd586133f4ae to your computer and use it in GitHub Desktop.
FROM node:8
# Environment variables acting as parameters of the runner.
ENV AWS_LAMBDA_FUNCTION_EVENT {}
ENV AWS_LAMBDA_FUNCTION_CONTEXT {}
# Create app directory
WORKDIR /usr/src/app
COPY . .
RUN npm install
# Parameters are named arguments extracted later with yargs or something else working on argv.
CMD ["sh", "-c", "./runner.js --event ${AWS_LAMBDA_FUNCTION_EVENT} --context ${AWS_LAMBDA_FUNCTION_CONTEXT}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment