FROM public.ecr.aws/lambda/python:3.14

LABEL parent-images=lambda-python314

# Install necessary tools (useradd lives in shadow-utils)
RUN echo latest > /etc/dnf/vars/releasever \
    && dnf --refresh install shadow-utils -y \
    && /usr/sbin/useradd -u 1010 --comment "" worker \
    && dnf remove shadow-utils -y \
    && dnf -y update \
    && dnf clean all

RUN chown -R worker:worker /var/task
RUN chown -R worker:worker /var/lang

# Run container as the worker user
USER worker
