Skip to content

Commit

Permalink
Merge pull request #74 from rhettre/feature/release-workflow
Browse files Browse the repository at this point in the history
Update release workflow
  • Loading branch information
rhettre authored Jul 27, 2024
2 parents 78dea16 + 30645fa commit 2ed783f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
-f Dockerfile .
docker create --name layer_builder lambda-layer-builder:${{ matrix.architecture }}
docker cp layer_builder:/tmp/layer.zip layer-${{ matrix.architecture }}.zip
unzip -l layer-${{ matrix.architecture }}.zip | grep -i cffi
- name: Get Release
id: get_release
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ 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 && \
RUN yum install -y zip && \
pip install --upgrade pip setuptools wheel && \
pip install -r requirements.txt && \
pip install . && \
mkdir -p /tmp/python && \
pip install \
--platform manylinux2014_x86_64 \
--platform manylinux2014_$(uname -m) \
--implementation cp \
--python-version 3.9 \
--only-binary=:all: --upgrade \
-r requirements.txt -t /tmp/python && \
pip install . -t /tmp/python && \
cd /tmp/python && \
zip -r9 /tmp/layer.zip . && \
zip -r9 /tmp/layer.zip . -x '*.pyc' '*.pyo' && \
cd /var/task

# Copy the layer.zip to a known location
Expand Down

0 comments on commit 2ed783f

Please sign in to comment.