From f8161121fdf19396dc5d73e4bc7ba8c822518673 Mon Sep 17 00:00:00 2001 From: khamaileon Date: Mon, 8 Jul 2019 20:57:56 +0200 Subject: [PATCH] Extends the default image instead of creating a fresh one --- README.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0f6c763a..27f8c4eb 100644 --- a/README.md +++ b/README.md @@ -386,19 +386,10 @@ For usage of `dockerizePip` on Windows do Step 1 only if running serverless on w Some Python packages require extra OS dependencies to build successfully. To deal with this, replace the default image (`lambci/lambda:python3.6`) with a `Dockerfile` like: ```dockerfile -# AWS Lambda execution environment is based on Amazon Linux 1 -FROM amazonlinux:1 - -# Install Python 3.6 -RUN yum -y install python36 python36-pip +FROM lambci/lambda:build-python3.6 # Install your dependencies -RUN curl -s https://bootstrap.pypa.io/get-pip.py | python3 -RUN yum -y install python3-devel mysql-devel gcc - -# Set the same WORKDIR as default image -RUN mkdir /var/task -WORKDIR /var/task +RUN yum -y install mysql-devel ``` Then update your `serverless.yml`: