Skip to content

Commit

Permalink
fix: errors with expanding archival files (#1138)
Browse files Browse the repository at this point in the history
Fixes #1130, #1084

The `p7zip` utility was removed from the `amzn2-core` yum repository used in the python3.11 lambda docker image. The `dnf` repository in the newer python3.12 lambda docker image contains `p7zip`.

Switching to the 3.12 image to resolve this issue

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
dontirun authored Mar 11, 2024
1 parent b3890d1 commit 80f8da7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions assets/lambda/code/download_defs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.11.2023.11.18.02
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.12
LABEL name=lambda/python/clamav
LABEL version=1.0

ARG CACHE_DATE=1
RUN yum update -y \
&& yum -y install clamav clamd \
&& yum clean all \
RUN dnf update -y \
&& dnf -y install clamav clamav-update clamd \
&& dnf clean all \
&& pip3 install --no-cache-dir cffi awslambdaric boto3 requests aws-lambda-powertools \
&& ln -s /etc/freshclam.conf /tmp/freshclam.conf

Expand Down
8 changes: 4 additions & 4 deletions assets/lambda/code/scan/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.11.2023.11.18.02
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.12
LABEL name=lambda/python/clamav
LABEL version=1.0

ARG CACHE_DATE=1
RUN yum update -y \
&& yum -y install clamav clamd p7zip \
&& yum clean all \
RUN dnf update -y \
&& dnf -y install clamav clamav-update clamd p7zip \
&& dnf clean all \
&& pip3 install --no-cache-dir cffi awslambdaric boto3 requests aws-lambda-powertools \
&& ln -s /etc/freshclam.conf /tmp/freshclam.conf

Expand Down

0 comments on commit 80f8da7

Please sign in to comment.