FROM python:3.12-slim-bullseye
# https://nodejs.org/en/about/previous-releases
ARG NODE_VERSION=v20.18.0
ARG NODE_DISTRO=linux-x64
SHELL ["/bin/bash", "-c"]
RUN apt update && apt -y upgrade
# Install useful basic packages
RUN apt install -y curl nmap ssh git dnsutils wget unzip zip xz-utils jq ca-certificates gnupg lsb-release vim telnet rsync
# AWS CLI V2 https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& bash ./aws/install \
&& rm awscliv2.zip && rm -r aws
# AWS CLI Auto Complete
ENV PATH="/usr/local/bin/aws_completer:${PATH}"
# AWS Session Manager plugin for the AWS CLI
RUN curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb" \
&& dpkg -i session-manager-plugin.deb \
&& rm session-manager-plugin.deb
# Install Node JS
RUN wget https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$NODE_DISTRO.tar.xz && \
mkdir -p /usr/local/lib/nodejs && \
tar -xJvf node-$NODE_VERSION-$NODE_DISTRO.tar.xz -C /usr/local/lib/nodejs && \
rm node-$NODE_VERSION-$NODE_DISTRO.tar.xz
ENV PATH="/usr/local/lib/nodejs/node-$NODE_VERSION-$NODE_DISTRO/bin:${PATH}"
# Install Docker CLI
# Add Docker Official GPG key && set up the repository
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt update && apt install -y docker-ce-cli
# Install Terraform
RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint && \
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list && \
apt update && \
apt install -y terraform && terraform -install-autocomplete
# Useful Pyhton Lib
RUN pip install --upgrade pip
RUN pip install pytest pytest-cov pytest-mock black pylint ruff python-semantic-release build virtualenv pip-tools mkdocs
RUN pip install sty pandas openpyxl boto3 requests fpdf2
# Install useful node packages
RUN npm install -g sass aws-cdk
RUN mkdir /gito7 && mkdir /keys
COPY *.sh /root/scripts/
COPY .bashrc /root
WORKDIR /gito7
#Start the Server !!
CMD ["/bin/bash"]