Skip to content

Instantly share code, notes, and snippets.

@caffeinetiger
Last active April 18, 2022 18:11
Show Gist options
  • Select an option

  • Save caffeinetiger/75b89dae10eeb152b4f64e9cbc91e4c9 to your computer and use it in GitHub Desktop.

Select an option

Save caffeinetiger/75b89dae10eeb152b4f64e9cbc91e4c9 to your computer and use it in GitHub Desktop.
Amazon Linux 2 base docker image with updated aws cli, kubectl, and eksctl
FROM amazonlinux:2.0.20210219.0
ARG PYTHON_VERSION=3.8.5
ARG BOTO3_VERSION=1.17.38
ARG BOTOCORE_VERSION=1.20.38
ARG APPUSER=app
RUN yum -y update &&\
yum install -y shadow-utils findutils gcc sqlite-devel zlib-devel wget tar.x86_64 gzip make unzip \
bzip2-devel openssl-devel readline-devel libffi-devel && \
groupadd ${APPUSER} && useradd ${APPUSER} -g ${APPUSER} && \
cd /usr/local/src && \
curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz && \
tar -xzf Python-${PYTHON_VERSION}.tgz && \
cd Python-${PYTHON_VERSION} && \
./configure --enable-optimizations && make && make altinstall && \
rm -rf /usr/local/src/Python-${PYTHON_VERSION}* && \
yum remove -y shadow-utils audit-libs libcap-ng && yum -y autoremove && \
yum clean all
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
RUN unzip awscliv2.zip
RUN ./aws/install
RUN rm -rf ./aws
RUN curl -o kubectl "https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/kubectl
RUN wget "https://github.com/weaveworks/eksctl/releases/download/0.41.0/eksctl_$(uname -s)_amd64.tar.gz" && \
tar -zxvf "eksctl_$(uname -s)_amd64.tar.gz" && \
chmod +x eksctl && \
mv eksctl /usr/local/bin/eksctl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment