Skip to content

Commit

Permalink
Update versions in Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
atquintegro committed May 16, 2024
1 parent ba73ac3 commit d7a4fe8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 35 deletions.
63 changes: 39 additions & 24 deletions docker/aws-eks-utils/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,60 +1,75 @@
FROM public.ecr.aws/docker/library/alpine:3.15.4
FROM public.ecr.aws/docker/library/ubuntu:22.04 as sessionmanagerplugin

ARG TERRAFORM_VERSION="1.1.8"
ARG TERRAGRUNT_VERSION="0.39.1"
ARG HELM_VERSION="3.8.2"
RUN apt-get update \
&& apt-get install -y curl \
&& curl -Lo "session-manager-plugin.deb" "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" \
&& dpkg -i "session-manager-plugin.deb"

FROM public.ecr.aws/docker/library/alpine:3.19.1

ARG TERRAFORM_VERSION="1.8.3"
ARG TERRAGRUNT_VERSION="0.58.5"
ARG HELM_VERSION="3.15.0"
ARG HELMFILE_VERSION="0.144.0"
ARG KUBECTL_VERSION="1.22.0"
ARG KUBECTL_VERSION="1.30.1"
ENV BASE_URL="https://get.helm.sh"
ENV TAR_FILE="helm-v${HELM_VERSION}-linux-amd64.tar.gz"

#Install python and pip
RUN echo "**** install Python ****" && \
apk add --no-cache python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
echo "**** install pip ****" && \
python3 -m ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
RUN echo "**** install Python and pip ****" && \
apk add --update --no-cache python3 py3-pip py3-setuptools py3-wheel

#Install additional packages and helm
RUN apk add --update --no-cache openssl git jq bash curl wget unzip ca-certificates && \
RUN echo "**** install additional packages and helm ****" && \
apk add --update --no-cache openssl git jq bash curl wget unzip ca-certificates && \
curl -L ${BASE_URL}/${TAR_FILE} |tar xvz && \
mv linux-amd64/helm /usr/bin/helm && \
chmod +x /usr/bin/helm

WORKDIR /tmp

#Install tfenv for terraform
RUN git clone https://github.com/tfutils/tfenv.git /usr/bin/.tfenv && \
RUN echo "**** install tfenv for terraform ****" && \
git clone https://github.com/tfutils/tfenv.git /usr/bin/.tfenv && \
ln -s /usr/bin/.tfenv/bin/* /usr/bin

#Intall tgenv for terragrunt
RUN git clone https://github.com/cunymatthieu/tgenv.git /usr/bin/.tgenv && \
RUN echo "**** install tgenv for terragrunt ****" && \
git clone https://github.com/cunymatthieu/tgenv.git /usr/bin/.tgenv && \
ln -s /usr/bin/.tgenv/bin/* /usr/bin

#Install terraform
RUN tfenv install $TERRAFORM_VERSION
RUN echo "**** install terraform ****" && \
tfenv install $TERRAFORM_VERSION

#Install terragrunt
RUN tgenv install $TERRAGRUNT_VERSION
RUN echo "**** install terragrunt ****" && \
tgenv install $TERRAGRUNT_VERSION

#Install aws-cli
RUN pip install awscli --upgrade
RUN echo "**** install aws-cli ****" && \
pip install awscli --upgrade --break-system-packages

#Install aws session-manager plugin for cli
RUN echo "**** install aws session manager plugin for cli ****"
COPY --from=sessionmanagerplugin /usr/local/sessionmanagerplugin/bin/session-manager-plugin /usr/local/bin/

#Install kubectl
RUN wget https://storage.googleapis.com/kubernetes-release/release/v"$KUBECTL_VERSION"/bin/linux/amd64/kubectl \
&& chmod +x kubectl && mv kubectl /bin/kubectl
RUN echo "**** install kubectl ****" && \
wget https://storage.googleapis.com/kubernetes-release/release/v"$KUBECTL_VERSION"/bin/linux/amd64/kubectl && \
chmod +x kubectl && mv kubectl /bin/kubectl

#Install docker
RUN apk add --no-cache --update docker
RUN echo "**** install docker ****" && \
apk add --no-cache --update docker

#Install helmfile
RUN wget https://github.com/roboll/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_linux_amd64 \
RUN echo "**** install helmfile ****" && \
wget https://github.com/roboll/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_linux_amd64 \
&& chmod +x helmfile_linux_amd64 && mv helmfile_linux_amd64 /bin/helmfile

# Install ssh
RUN apk add openssh
RUN echo "**** install openssh ****" && \
apk add openssh

ENTRYPOINT [""]
14 changes: 4 additions & 10 deletions docker/postgresql-backups/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
FROM public.ecr.aws/docker/library/postgres:12-alpine
FROM public.ecr.aws/docker/library/postgres:16-alpine

#Install python and pip
RUN echo "**** install Python ****" && \
apk add --no-cache python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
echo "**** install pip ****" && \
python3 -m ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi
RUN echo "**** install Python and pip ****" && \
apk add --update --no-cache python3 py3-pip py3-setuptools py3-wheel

COPY requirements.txt .

RUN pip install --upgrade --no-cache-dir -r requirements.txt
RUN pip install --upgrade --no-cache-dir --break-system-packages -r requirements.txt

COPY backup.py .

Expand Down
2 changes: 1 addition & 1 deletion docker/postgresql-exporter-script/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/docker/library/postgres:12-alpine
FROM public.ecr.aws/docker/library/postgres:16-alpine

WORKDIR /app

Expand Down

0 comments on commit d7a4fe8

Please sign in to comment.