Skip to content

Instantly share code, notes, and snippets.

@vicotrbb
Created October 17, 2021 21:21
Show Gist options
  • Save vicotrbb/8b1e5c6e887b9eb1b2bae8f8d8547e65 to your computer and use it in GitHub Desktop.
Save vicotrbb/8b1e5c6e887b9eb1b2bae8f8d8547e65 to your computer and use it in GitHub Desktop.
FROM python:3.8-alpine AS installer
WORKDIR /app
COPY requirements.txt .
RUN apk add --no-cache --virtual .build-deps gcc libc-dev libxslt-dev && \
apk add --no-cache libxslt && \
apk del .build-deps
FROM public.ecr.aws/lambda/python:3.8
COPY --from=installer /app ${LAMBDA_TASK_ROOT}
COPY . ${LAMBDA_TASK_ROOT}
RUN pip3 install --no-cache-dir -r requirements.txt
CMD ["stocks_handler.handler"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment