Created
June 18, 2025 10:32
-
-
Save thimslugga/96bb9a64fb2bf64cec5c824c569e8679 to your computer and use it in GitHub Desktop.
Amazon Linux 2023 Minimal Container Image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1 | |
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build | |
RUN \ | |
set -ex ; \ | |
sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf ; \ | |
dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \ | |
-y \ | |
--allowerasing \ | |
--setopt=install_weak_deps=False \ | |
--installroot /sysroot \ | |
install \ | |
bash \ | |
curl \ | |
wget \ | |
gnupg2 \ | |
unzip \ | |
tar \ | |
gzip \ | |
shadow-utils \ | |
which \ | |
procps \ | |
git \ | |
jq \ | |
&& dnf clean all \ | |
&& rm -rf /var/cache/dnf/* ; \ | |
FROM scratch | |
COPY --from=build /sysroot / | |
WORKDIR / | |
ENTRYPOINT ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment