File tree Expand file tree Collapse file tree 4 files changed +75
-2
lines changed Expand file tree Collapse file tree 4 files changed +75
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ USER root
8
8
RUN apt-get update -y && apt-get upgrade -y
9
9
10
10
# install basic packages
11
- RUN apt-get install -y git openssh-server ca-certificates curl apt-transport-https lsb-release gnupg wget software-properties-common
11
+ RUN apt-get install -y git openssh-server ca-certificates curl apt-transport-https lsb-release gnupg wget software-properties-common
12
12
13
13
# Install terraform - https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
14
14
RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ USER root
8
8
RUN apt-get update -y && apt-get upgrade -y
9
9
10
10
# install basic packages
11
- RUN apt-get install -y git openssh-server ca-certificates curl apt-transport-https lsb-release gnupg wget software-properties-common
11
+ RUN apt-get install -y git openssh-server ca-certificates curl apt-transport-https lsb-release gnupg wget software-properties-common
12
12
13
13
# Install terraform - https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
14
14
RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
Original file line number Diff line number Diff line change
1
+ # Using jenkins/inbound-agent:latest-jdk21 as base image
2
+ FROM jenkins/inbound-agent:latest-jdk21
3
+
4
+ # Add label
5
+ LABEL authors="githubofkrishnadhas"
6
+
7
+ # Root user
8
+ USER root
9
+
10
+ # Install Docker & basic packages
11
+ RUN apt-get update && \
12
+ apt-get install -y -qq \
13
+ ca-certificates \
14
+ curl \
15
+ wget \
16
+ zip \
17
+ apt-transport-https \
18
+ lsb-release \
19
+ gnupg \
20
+ git \
21
+ software-properties-common && \
22
+ mkdir -p /etc/apt/keyrings && \
23
+ curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
24
+ chmod a+r /etc/apt/keyrings/docker.asc && \
25
+ echo \
26
+ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
27
+ $(. /etc/os-release && echo " $VERSION_CODENAME") stable" | \
28
+ tee /etc/apt/sources.list.d/docker.list > /dev/null && \
29
+ apt-get update && \
30
+ apt-get install -y -qq \
31
+ docker-ce \
32
+ docker-ce-cli \
33
+ containerd.io \
34
+ docker-buildx-plugin \
35
+ docker-compose
36
+
37
+ # Install Azure CLI latest available version
38
+ RUN mkdir -p /etc/apt/keyrings && \
39
+ curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft.gpg > /dev/null && \
40
+ chmod go+r /etc/apt/keyrings/microsoft.gpg && \
41
+ AZ_DIST=$(lsb_release -cs) && \
42
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_DIST main" | \
43
+ tee /etc/apt/sources.list.d/azure-cli.list > /dev/null && \
44
+ apt-get update && \
45
+ apt-get install -y -qq azure-cli
46
+
Original file line number Diff line number Diff line change
1
+ # Jenkins inbound agent as base image
2
+ FROM jenkins/inbound-agent:latest-jdk21
3
+
4
+ # Root user for installations
5
+ USER root
6
+
7
+ # update and upgrade system packages
8
+ RUN apt-get update -y && apt-get upgrade -y
9
+
10
+ # install basic packages
11
+ RUN apt-get install -y git openssh-server ca-certificates curl apt-transport-https lsb-release gnupg wget software-properties-common
12
+
13
+ # Install terraform - https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli
14
+ RUN wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && \
15
+ 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 && \
16
+ apt-get update -y && apt-get install terraform -y && terraform --version
17
+
18
+
19
+ # install azure cli latest avaialble version - https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt
20
+ RUN apt-get update -y && \
21
+ mkdir -p /etc/apt/keyrings && \
22
+ curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft.gpg > /dev/null && \
23
+ chmod go+r /etc/apt/keyrings/microsoft.gpg && \
24
+ AZ_DIST=$(lsb_release -cs) && \
25
+ echo "deb [arch=`dpkg --print-architecture` signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/azure-cli/ $AZ_DIST main" | tee /etc/apt/sources.list.d/azure-cli.list && \
26
+ apt-get update && \
27
+ apt-get install azure-cli -y
You can’t perform that action at this time.
0 commit comments