Skip to content

Commit

Permalink
feat: update docker images to use public.ecr.aws/lambda/python:3.11 (#…
Browse files Browse the repository at this point in the history
…1000)

The old container images used `clamav` from the `epel` repository. Newer versions  of the  `public.ecr.aws/lambda/python:3.8` use Amazon Linux 2023 which does not support the epel repository.  These changes  upgrade the image to use `public.ecr.aws/lambda/python:3.11` and use the `clamav` package from the `Amazon Lniux 2023` repository instead.


----

*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 Oct 26, 2023
1 parent adbd42f commit b797174
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions assets/lambda/code/download_defs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# 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.8
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.11
LABEL name=lambda/python/clamav
LABEL version=1.0

ARG CACHE_DATE=1
RUN yum update -y \
&& yum install -y amazon-linux-extras \
&& PYTHON=python2 amazon-linux-extras install epel \
&& yum -y install clamav clamd \
&& yum clean all \
&& pip3 install --no-cache-dir cffi awslambdaric boto3 requests aws-lambda-powertools \
Expand Down
4 changes: 1 addition & 3 deletions assets/lambda/code/scan/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# 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.8
FROM --platform=linux/amd64 public.ecr.aws/lambda/python:3.11
LABEL name=lambda/python/clamav
LABEL version=1.0

ARG CACHE_DATE=1
RUN yum update -y \
&& yum install -y amazon-linux-extras \
&& PYTHON=python2 amazon-linux-extras install epel \
&& yum -y install clamav clamd p7zip \
&& yum clean all \
&& pip3 install --no-cache-dir cffi awslambdaric boto3 requests aws-lambda-powertools \
Expand Down

0 comments on commit b797174

Please sign in to comment.