Skip to content

Commit

Permalink
Merge pull request #73 from rhettre/feature/release-workflow
Browse files Browse the repository at this point in the history
Update Dockerfile
  • Loading branch information
rhettre committed Jul 27, 2024
2 parents 4b2a4ed + 31c052d commit 78dea16
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@ FROM public.ecr.aws/lambda/python:3.9
# Set up the work directory
WORKDIR /var/task

# Install zip
RUN yum install -y zip

# Copy your application code and requirements.txt into the Docker image
COPY . .

# Install dependencies and create the layer
RUN pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt && \
pip install . && \
mkdir -p python/lib/python3.9/site-packages && \
mkdir -p /tmp/python && \
pip install \
--platform manylinux2014_x86_64 \
--implementation cp \
--python-version 3.9 \
--only-binary=:all: --upgrade \
-r requirements.txt -t python/lib/python3.9/site-packages && \
pip install . -t python/lib/python3.9/site-packages && \
cd python/lib/python3.9/site-packages && \
-r requirements.txt -t /tmp/python && \
pip install . -t /tmp/python && \
cd /tmp/python && \
zip -r9 /tmp/layer.zip . && \
cd /var/task

Expand Down

0 comments on commit 78dea16

Please sign in to comment.