Skip to content

Instantly share code, notes, and snippets.

@ojacques
Created February 26, 2024 08:08
Show Gist options
  • Save ojacques/430727135bc3950571ed566c4555c2e0 to your computer and use it in GitHub Desktop.
Save ojacques/430727135bc3950571ed566c4555c2e0 to your computer and use it in GitHub Desktop.
Minimal Docker image from AL2023 Amazon Linux 2023

Minimal Docker image from AL2023 Amazon Linux 2023 (in this case, bash and its dependencies)

FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as build
RUN dnf --releasever=$(rpm -q system-release --qf '%{VERSION}') \
  --installroot /sysroot \
  -y \
  --setopt=install_weak_deps=False \
  install bash

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