| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  | FROM hashicorp/packer:light as packer
 | 
					
						
							|  |  |  | FROM hashicorp/terraform:light as terraform
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-05 16:32:50 +10:00
										 |  |  | FROM alpine:latest AS download
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | ENV OVFTOOL_VERSION=4.4.1-16812187
 | 
					
						
							|  |  |  | ENV OVFTOOL_INSTALLER=VMware-ovftool-${OVFTOOL_VERSION}-lin.x86_64.bundle
 | 
					
						
							|  |  |  | ENV OVFTOOL_SHA256=ecdb3dcb58494d643d35661dcda948025661ec12ce615f043e1ec5d4c85de2ce | 
					
						
							| 
									
										
										
										
											2021-01-04 11:09:50 +01:00
										 |  |  | ARG REPO_USERNAME
 | 
					
						
							|  |  |  | ARG REPO_PASSWORD
 | 
					
						
							|  |  |  | ADD https://${REPO_USERNAME}:${REPO_PASSWORD}@sn.itch.fyi/Repository/bin/VMware/ovftool/4.4.x/${OVFTOOL_INSTALLER} /tmp/ovftool-installer
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-06-05 16:32:50 +10:00
										 |  |  | RUN apk --update add --no-cache \
 | 
					
						
							| 
									
										
										
										
											2024-06-05 16:51:06 +10:00
										 |  |  |       curl \
 | 
					
						
							| 
									
										
										
										
											2023-03-15 11:53:25 +01:00
										 |  |  |       jq && \
 | 
					
						
							| 
									
										
										
										
											2024-06-05 16:51:06 +10:00
										 |  |  |     curl -L https://api.github.com/repos/mikefarah/yq/releases/latest | \
 | 
					
						
							| 
									
										
										
										
											2023-03-16 12:37:47 +01:00
										 |  |  |       jq -r '.assets[] | select(.name | endswith("yq_linux_amd64")) | .browser_download_url' | \
 | 
					
						
							| 
									
										
										
										
											2024-06-05 16:51:06 +10:00
										 |  |  |       xargs -I {} curl -L -o /tmp/yq {} && \
 | 
					
						
							| 
									
										
										
										
											2023-03-16 12:37:47 +01:00
										 |  |  |     chmod +x /tmp/yq
 | 
					
						
							| 
									
										
										
										
											2023-03-15 11:53:25 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-19 14:00:14 +02:00
										 |  |  | FROM debian:11-slim
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | COPY --from=packer /bin/packer /bin/packer
 | 
					
						
							|  |  |  | COPY --from=terraform /bin/terraform /bin/terraform
 | 
					
						
							|  |  |  | COPY --from=download /tmp/ovftool-installer /tmp/ovftool-installer
 | 
					
						
							| 
									
										
										
										
											2023-03-15 11:53:25 +01:00
										 |  |  | COPY --from=download /tmp/yq /bin/yq
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | ENV LANG en_US.UTF-8
 | 
					
						
							|  |  |  | ENV LANGUAGE en_US:en
 | 
					
						
							|  |  |  | ENV LC_ALL en_US.UTF-8
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:17:41 +01:00
										 |  |  | RUN apt-get update && apt-get install -y --no-install-recommends \
 | 
					
						
							|  |  |  |       apt-transport-https \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:21:57 +01:00
										 |  |  |       ca-certificates \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:17:41 +01:00
										 |  |  |       curl \
 | 
					
						
							|  |  |  |       gnupg && \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 10:14:50 +01:00
										 |  |  |     curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /usr/share/keyrings/microsoft.gpg && \
 | 
					
						
							|  |  |  |     echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list && \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:34:13 +01:00
										 |  |  |     apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
 | 
					
						
							| 
									
										
										
										
											2021-05-27 12:57:22 +02:00
										 |  |  |       # (build-essential) Dependency for installation of InSpec
 | 
					
						
							| 
									
										
										
										
											2021-01-05 16:59:31 +00:00
										 |  |  |       build-essential \
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  |       git \
 | 
					
						
							|  |  |  |       jq \
 | 
					
						
							| 
									
										
										
										
											2022-04-19 16:06:01 +02:00
										 |  |  |       locales \
 | 
					
						
							| 
									
										
										
										
											2023-03-04 13:07:42 +01:00
										 |  |  |       make \
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  |       netcat-openbsd \
 | 
					
						
							| 
									
										
										
										
											2024-06-06 11:18:18 +10:00
										 |  |  |       npm \
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  |       openssh-client \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:25:35 +01:00
										 |  |  |       powershell-lts \
 | 
					
						
							| 
									
										
										
										
											2021-05-27 12:57:22 +02:00
										 |  |  |       # (python3-*) Dependency for installation of Ansible
 | 
					
						
							|  |  |  |       python3-pip \
 | 
					
						
							|  |  |  |       python3-setuptools \
 | 
					
						
							|  |  |  |       python3-wheel \
 | 
					
						
							| 
									
										
										
										
											2021-06-17 10:45:43 +02:00
										 |  |  |       # (qemu-utils) Dependency for Packer (conversion to raw disk format)
 | 
					
						
							|  |  |  |       qemu-utils \
 | 
					
						
							| 
									
										
										
										
											2021-06-08 16:51:38 +02:00
										 |  |  |       # (sshpass) Dependency for Packer (non-interactive password authentication)
 | 
					
						
							|  |  |  |       sshpass \
 | 
					
						
							| 
									
										
										
										
											2021-06-08 16:54:22 +02:00
										 |  |  |       # (xorriso) Dependency for Packer (generating isofs image)
 | 
					
						
							| 
									
										
										
										
											2021-06-07 14:03:34 +02:00
										 |  |  |       xorriso \
 | 
					
						
							| 
									
										
										
										
											2021-04-09 09:35:45 +02:00
										 |  |  |       yamllint && \
 | 
					
						
							| 
									
										
										
										
											2022-04-19 16:06:01 +02:00
										 |  |  |     sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
 | 
					
						
							|  |  |  |     locale-gen && \
 | 
					
						
							| 
									
										
										
										
											2024-06-06 11:18:18 +10:00
										 |  |  |     npm install npm@latest -g && \
 | 
					
						
							|  |  |  |     npm install n -g && \
 | 
					
						
							|  |  |  |     n latest && \
 | 
					
						
							| 
									
										
										
										
											2021-05-27 12:57:22 +02:00
										 |  |  |     pip3 install --upgrade pip && \
 | 
					
						
							| 
									
										
										
										
											2022-04-18 14:37:43 +02:00
										 |  |  |     pip3 install \
 | 
					
						
							| 
									
										
										
										
											2023-05-22 16:47:10 +02:00
										 |  |  |       ansible-core~=2.14.0 \
 | 
					
						
							| 
									
										
										
										
											2022-04-19 13:52:10 +02:00
										 |  |  |       # (jmespath) Dependency for Ansible 'json_query' filter
 | 
					
						
							|  |  |  |       jmespath \
 | 
					
						
							| 
									
										
										
										
											2022-04-18 22:14:33 +02:00
										 |  |  |       # (netaddr) Dependency for Ansible 'ipaddr' filter
 | 
					
						
							|  |  |  |       netaddr \
 | 
					
						
							|  |  |  |       # (pyvmomi & requests) Dependency for Ansible 'vmware_guest' module
 | 
					
						
							| 
									
										
										
										
											2022-04-18 14:54:41 +02:00
										 |  |  |       pyvmomi \
 | 
					
						
							| 
									
										
										
										
											2022-04-18 14:37:43 +02:00
										 |  |  |       requests && \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 11:44:08 +01:00
										 |  |  |     update-ca-certificates --fresh && \
 | 
					
						
							| 
									
										
										
										
											2024-06-05 22:08:42 +10:00
										 |  |  |     pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted'" && \
 | 
					
						
							|  |  |  |     pwsh -Command "Install-Module -Name 'powershell-yaml','VMware.PowerCLI'" && \
 | 
					
						
							| 
									
										
										
										
											2021-01-04 23:02:25 +01:00
										 |  |  |     pwsh -Command "Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP \$False -Confirm:\$False" && \
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  |     sh /tmp/ovftool-installer --console --eulas-agreed --required && \
 | 
					
						
							| 
									
										
										
										
											2021-01-11 11:46:41 +00:00
										 |  |  |     apt-get remove -y \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:17:41 +01:00
										 |  |  |       apt-transport-https \
 | 
					
						
							| 
									
										
										
										
											2021-01-11 11:46:41 +00:00
										 |  |  |       build-essential \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 11:44:08 +01:00
										 |  |  |       # ca-certificates \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 09:17:41 +01:00
										 |  |  |       gnupg && \
 | 
					
						
							| 
									
										
										
										
											2021-01-11 11:46:41 +00:00
										 |  |  |     apt-get autoremove -y && \
 | 
					
						
							| 
									
										
										
										
											2021-01-04 23:12:58 +01:00
										 |  |  |     rm -rf /var/lib/apt/lists/* && \
 | 
					
						
							| 
									
										
										
										
											2020-12-30 11:58:00 +01:00
										 |  |  |     rm -f /tmp/ovftool-installer
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ENTRYPOINT []
 | 
					
						
							| 
									
										
										
										
											2022-04-18 22:14:33 +02:00
										 |  |  | CMD []
 |