Adding sources.
This commit is contained in:
40
Dockerfile
Normal file
40
Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# Add essential packages
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl jq gpg software-properties-common apt-transport-https ca-certificates
|
||||
|
||||
# Install Terraform
|
||||
RUN curl -sL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o - > /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com noble main" > /etc/apt/sources.list.d/hashicorp.list
|
||||
RUN apt-get update && apt-get install -y terraform
|
||||
RUN cat <<EOF > /etc/bash_completion.d/terraform
|
||||
complete -C /usr/bin/terraform terraform
|
||||
EOF
|
||||
|
||||
# Install Azure CLI
|
||||
RUN curl -sL -o /tmp/packages-microsoft-prod.deb https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb && \
|
||||
dpkg -i /tmp/packages-microsoft-prod.deb && rm -f /tmp/packages-microsoft-prod.deb
|
||||
|
||||
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/azure-cli/ noble main" > /etc/apt/sources.list.d/azure-cli.list
|
||||
RUN apt-get update && apt-get install -y azure-cli
|
||||
|
||||
# Configure Bash
|
||||
RUN cat <<'EOF' >> /etc/bash.bashrc
|
||||
if [ -f /usr/lib/git-core/git-sh-prompt ]; then
|
||||
source /usr/lib/git-core/git-sh-prompt
|
||||
|
||||
# Then PS1 can include __git_ps1 which is optimized and shows branch + state:
|
||||
PS1='\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\]\[\e[33m\]$(__git_ps1 " (%s)")\[\e[0m\]\$ '
|
||||
fi
|
||||
|
||||
export PATH=$HOME/bin:$PATH
|
||||
EOF
|
||||
|
||||
# Add more packages (keep it last to optimize layer caching)
|
||||
RUN apt-get install -y zip unzip tree wget nano neovim \
|
||||
python3 python3-venv python3-pip
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user