FROM mcr.microsoft.com/azurelinux-beta/base/core:4.0 ENV \ # UID of the non-root user 'app' APP_UID=1654 \ # Configure web servers to bind to port 8080 when present ASPNETCORE_HTTP_PORTS=8080 \ # Enable detection of running in a container DOTNET_RUNNING_IN_CONTAINER=true RUN dnf install -y \ ca-certificates \ \ # .NET dependencies glibc \ icu \ libgcc \ libstdc++ \ openssl-libs \ tzdata \ && dnf clean all # Create a non-root user and group RUN dnf install -y \ shadow-utils \ && groupadd \ --gid=$APP_UID \ app \ && useradd --no-log-init \ --uid=$APP_UID \ --gid=$APP_UID \ --create-home \ app \ && dnf remove -y \ shadow-utils \ && dnf clean all