Skip to content
English
  • There are no suggestions because the search field is empty.

[Public] Iron PDF Docker Build Fails Due to xorg-x11-utils Conflict on Amazon Linux 2023

Instructions on how to fix Docker build failure caused by xorg-x11-utils conflicts while deploying on AWS Lambda

Description

When building a docker image targetting Amazon Linux 2023 (base image : public.ecr.aws/lambda/dotnet:8), the build may fail with a dependency conflict error related to xorg-x11-utils. This occurs because the pre-installed xproppackage obsoletes older versions of xorg-x11-utils, preventing successful installation with the following error:
problem with installed package xprop-1.2.7-1.amzn2023.x86_64 from amazonlinux obsoletes xorg-x11-utils < 7.5-39 provided by xorg-x11-utils-7.5-38.amzn2023.0.2.x86_64 from amazonlinux

Solution

The solution is to remove xorg-x11-utils from the list of Linux dependencies being installed in the Docker file with dnf install. The system already includes xprop, which covers its functionality.


Fixed Docker File


FROM public.ecr.aws/lambda/dotnet:8

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-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

# Copy Lambda build output
COPY "bin/Release/lambda-publish" .