Last active
July 26, 2024 16:35
-
-
Save 4l3j4ndr0/c19921fb49e09647d180c000ff31a798 to your computer and use it in GitHub Desktop.
Dockerfile to build images with AWS Lambda capabilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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.12 | |
| LABEL name=lambda/python/clamav | |
| LABEL version=1.0 | |
| ARG CACHE_DATE=1 | |
| 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 | |
| COPY clamd.conf /etc/clamd.conf | |
| COPY lambda.py /var/task/lambda.py | |
| ENTRYPOINT [ "/var/lang/bin/python3", "-m", "awslambdaric" ] | |
| CMD [ "lambda.lambda_handler" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment