Skip to content

Instantly share code, notes, and snippets.

@ironsoftwarebuild
Last active February 19, 2025 22:03
Show Gist options
  • Save ironsoftwarebuild/b700ca3ee47f405c257e72b2f8a33d52 to your computer and use it in GitHub Desktop.
Save ironsoftwarebuild/b700ca3ee47f405c257e72b2f8a33d52 to your computer and use it in GitHub Desktop.
FROM public.ecr.aws/lambda/dotnet:8
# install necessary packages
RUN dnf update -y && dnf install -y gcc-c++ pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 dbus-glib-devel && dnf install -y libXdamage.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 && dnf install -y libXrandr.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi && dnf install -y xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc && dnf install -y mesa-libgbm.x86_64 && dnf install -y nss-3.90.0-3.amzn2023.0.4.x86_64
WORKDIR /var/task
# This COPY command copies the .NET Lambda project's build artifacts from the host machine into the image.
# The source of the COPY should match where the .NET Lambda project publishes its build artifacts. If the Lambda function is being built
# with the AWS .NET Lambda Tooling, the `--docker-host-build-output-dir` switch controls where the .NET Lambda project
# will be built. The .NET Lambda project templates default to having `--docker-host-build-output-dir`
# set in the aws-lambda-tools-defaults.json file to "bin/Release/lambda-publish".
#
# Alternatively Docker multi-stage build could be used to build the .NET Lambda project inside the image.
# For more information on this approach checkout the project's README.md file.
COPY "bin/Release/lambda-publish" .
@jkkrause
Copy link

Is this compatible with .NET 9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment