Closed matejsp closed 6 months ago
The "normal" AL2023 Docker Image has the full DNF software, the "Minimal" Version has microdnf:
https://docs.aws.amazon.com/linux/al2023/ug/minimal-container.html
The Amazon Linux 2023 (AL2023) minimal container image (introduced in AL2023.2) differs from the base container image in that it only includes the absolute minimum amount of software needed to install other packages. It is not designed to be a convenient set of packages, but designed to be a minimal set of packages.
The AL2023 minimal container image is built from software components already available in AL2023. The key difference between the minimal container image and what is included in the AL2023 AMIs and base container images is the package manager. The dnf package manager is provided by microdnf rather than the fully featured Python based dnf which is included in the AMIs and base container image.
The Amazon Linux 2023 minimal container image forms the base of the provided.al2023 AWS Lambda runtime environment.
See Comparing packages installed on Amazon Linux 2023 Container Images for a detailed list of packages included in the minimal container image and how it differs from the standard container image.
I would like minimal docker image without any python installed.
Why not just use the Minimal Container Image?
I was searching for minimal at: https://hub.docker.com/_/amazonlinux/tags but could not find it. However running:
docker run -it public.ecr.aws/amazonlinux/amazonlinux:2023-minimal bash
Basically this task is then solved. Would be REALLY nice to have it on official docker hub.
Is your feature request related to a problem? Please describe. I would like minimal docker image without any python installed.
Describe the solution you'd like
docker run -it --entrypoint '' public.ecr.aws/lambda/python:3.12 bash rpm -qa | sort
docker run -it amazonlinux:2023.3.20231211.4 bash rpm -qa | sort
Describe alternatives you've considered
But it microndnf does not work for some reason ...
However the same method microdnf work in public.ecr.aws/lambda/python:3.12
Additional context Both AL2023 and Lambda python 3.12 uses the same /etc/yum.repos.d/amazonlinux.repo file. Except that for AL2023 microdnf does not work for me.
I tried corrupting repo on lambda and it got me to: https://cdn.amazonlinux.com/al2023/core/mirrors/2023.2.20231030/x86_64/mirror.list
however microdnf on al2023 tries: https://cdn.amazonlinux.com/al2023/core/mirrors/2023/x86_64/mirror.list
However it works by fixing the release ver for /etc/dnf/vars/releasever: