Skip to content

Commit 8f2a4a0

Browse files
authored
Extends the default image instead of creating a fresh one (#380)
Extends the default image instead of creating a fresh one
2 parents 0ecd2be + f816112 commit 8f2a4a0

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -386,19 +386,10 @@ For usage of `dockerizePip` on Windows do Step 1 only if running serverless on w
386386
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:
387387
388388
```dockerfile
389-
# AWS Lambda execution environment is based on Amazon Linux 1
390-
FROM amazonlinux:1
391-
392-
# Install Python 3.6
393-
RUN yum -y install python36 python36-pip
389+
FROM lambci/lambda:build-python3.6
394390
395391
# Install your dependencies
396-
RUN curl -s https://bootstrap.pypa.io/get-pip.py | python3
397-
RUN yum -y install python3-devel mysql-devel gcc
398-
399-
# Set the same WORKDIR as default image
400-
RUN mkdir /var/task
401-
WORKDIR /var/task
392+
RUN yum -y install mysql-devel
402393
```
403394

404395
Then update your `serverless.yml`:

0 commit comments

Comments
 (0)