-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba73ac3
commit d7a4fe8
Showing
3 changed files
with
44 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
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 [""] |
This file contains 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
This file contains 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