Skip to content

Instantly share code, notes, and snippets.

@marcosborges
Created September 27, 2023 12:11
Show Gist options
  • Save marcosborges/3dec0692e074cfc9da311c01ef6d266c to your computer and use it in GitHub Desktop.
Save marcosborges/3dec0692e074cfc9da311c01ef6d266c to your computer and use it in GitHub Desktop.
VSTSAgent.Dockerfile
FROM ubuntu:20.04
LABEL version="0.0.12"
#
# INSTALL COMMOM TOOLS
#
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
apt-transport-https \
apt-utils \
ca-certificates \
curl \
git \
iputils-ping \
jq \
lsb-release \
software-properties-common \
make \
python \
openssh-client \
unzip \
wget \
groff
#
# INSTALL INFRACOST
#
RUN curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
#
# INSTALL TERRAFORM
#
RUN TERRAFORM_VERSION=1.2.2 &&\
wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip &&\
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip &&\
mv terraform /usr/local/bin/ &&\
which terraform
#
# INSTALL AZ CLI
#
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash
#
# INSTALL AWS CLI
#
ENV AWS_PAGER=""
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" &&\
unzip awscliv2.zip &&\
./aws/install
#
# INSTALL YQ, JQ, XQ
#
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
RUN chmod a+x /usr/local/bin/yq
RUN yq --version
RUN curl -sSL https://bit.ly/install-xq | bash
RUN xq --version
#
# INSTALL DOCKER
#
RUN curl -fsSL https://get.docker.com | sh
#
# INITIALIZE AGENT
#
ENV TARGETARCH=linux-x64
WORKDIR /azp
COPY ./start.sh .
RUN chmod +x start.sh
ENTRYPOINT [ "./start.sh" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment