FROM public.ecr.aws/amazonlinux/amazonlinux:2023 LABEL org.opencontainers.image.title=jswank/aws-cli \ org.opencontainers.image.description="A minimal image for running AWS CLI " \ org.opencontainers.image.url=https://git.sr.ht/~jswank/aws-cli \ org.opencontainers.image.authors="Jason Swank" \ org.opencontainers.image.licenses=MIT RUN yum install -y --allowerasing \ coreutils shadow-utils \ less which tar \ sudo vim-minimal \ aws-cli && \ yum clean all # install eksctl RUN curl -sL https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz \ | tar -xzf - \ && install eksctl /usr/local/bin/eksctl # install kubectl RUN cd /tmp \ && curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ && install kubectl /usr/local/bin/kubectl \ && rm kubectl RUN adduser -r --create-home --shell /bin/bash --groups wheel cli RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/00-all-wheel-np COPY --chown=cli:cli home /home/cli WORKDIR /home/cli USER cli CMD ["/bin/bash", "-l"]