mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-26 07:58:14 +00:00
2291379040
Co-authored-by: GoodOlClint <151449+GoodOlClint@users.noreply.github.com> Agent-Logs-Url: https://github.com/GoodOlClint/PSProxmoxVE/sessions/677fba6b-906d-4cf6-82fa-3b7ab6afc648
54 lines
2.7 KiB
Docker
54 lines
2.7 KiB
Docker
# PSProxmoxVE development and integration testing container
|
|
#
|
|
# Two targets:
|
|
# dev - .NET SDK + PowerShell + Pester (build & test, works on ARM/x86)
|
|
# dev-infra - Adds Terraform + PVE provisioning tools (x86 only)
|
|
#
|
|
# Usage:
|
|
# # For build + test (works on Mac M-series):
|
|
# docker compose -f tests/docker-compose.test.yml up -d
|
|
#
|
|
# # For full CI flow including provisioning (x86 only):
|
|
# docker compose -f tests/docker-compose.test.yml --profile infra up -d
|
|
|
|
# ── Base: .NET SDK + PowerShell + Pester ────────────────────────────
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-noble AS dev
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl jq openssh-client ca-certificates apt-transport-https gnupg \
|
|
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
|
|
| gpg --dearmor -o /usr/share/keyrings/microsoft-archive-keyring.gpg \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] \
|
|
https://packages.microsoft.com/ubuntu/24.04/prod noble main" \
|
|
> /etc/apt/sources.list.d/microsoft-prod.list \
|
|
&& apt-get update && apt-get install -y --no-install-recommends powershell \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& pwsh -NoProfile -Command \
|
|
'Set-PSRepository -Name PSGallery -InstallationPolicy Trusted; \
|
|
Install-Module -Name Pester -MinimumVersion 5.0 -Scope AllUsers -Force' \
|
|
&& mkdir -p /usr/local/share/powershell/Modules/PSProxmoxVE
|
|
|
|
WORKDIR /repo
|
|
CMD ["pwsh", "-NoProfile"]
|
|
|
|
# ── Full: adds Terraform + PVE provisioning tools (x86 only) ───────
|
|
FROM dev AS dev-infra
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
dosfstools mtools sshpass python3 xorriso gnupg \
|
|
&& curl -fsSL https://apt.releases.hashicorp.com/gpg \
|
|
| gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg \
|
|
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
|
|
https://apt.releases.hashicorp.com noble main" \
|
|
> /etc/apt/sources.list.d/hashicorp.list \
|
|
&& curl -fsSL https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg \
|
|
-o /usr/share/keyrings/proxmox-release-bookworm.gpg \
|
|
&& echo "deb [signed-by=/usr/share/keyrings/proxmox-release-bookworm.gpg] \
|
|
http://download.proxmox.com/debian/pve bookworm pve-no-subscription" \
|
|
> /etc/apt/sources.list.d/proxmox-pve.list \
|
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
|
terraform proxmox-auto-install-assistant qemu-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|