Repository navigation
Expand file tree
/
Copy pathDockerfile.linux.dev
More file actions
35 lines (25 loc) · 1.99 KB
/
Copy pathDockerfile.linux.dev
File metadata and controls
35 lines (25 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM mcr.microsoft.com/dotnet/sdk:10.0-resolute
WORKDIR /DSC
COPY . .
SHELL ["bash", "-c"]
RUN wget -q https://github.com/microsoft/omi/releases/download/v1.9.1-0/omi-1.9.1-0.ssl_300.ulinux.s.x64.deb && \
dpkg -i ./omi-1.9.1-0.ssl_300.ulinux.s.x64.deb && \
rm ./omi-1.9.1-0.ssl_300.ulinux.s.x64.deb && \
cp /opt/omi/lib/libmi.so /usr/share/powershell/.store/powershell.linux.x64/7.6.6/powershell.linux.x64/7.6.6/tools/net10.0/any/runtimes/linux-x64/native/
RUN wget -q https://github.com/microsoft/PowerShell-DSC-for-Linux/releases/download/v1.2.4-0/dsc-1.2.4-0.ssl_110.x64.deb && \
dpkg -i ./dsc-1.2.4-0.ssl_110.x64.deb && \
rm ./dsc-1.2.4-0.ssl_110.x64.deb
RUN wget https://archive.ubuntu.com/ubuntu/pool/main/n/nano/nano_9.2-1_amd64.deb && \
dpkg -i ./nano_9.2-1_amd64.deb && \
rm nano_9.2-1_amd64.deb
RUN mv /etc/opt/omi/conf/dsc/configuration/baseregistration /etc/opt/omi/conf/dsc/configuration/BaseRegistration && \
mv /etc/opt/omi/conf/dsc/configuration/BaseRegistration/baseresource.schema.mof /etc/opt/omi/conf/dsc/configuration/BaseRegistration/BaseResource.schema.mof
RUN pwsh -Command 'Install-Module -Name "Microsoft.PowerShell.PSResourceGet" -Repository "PSGallery" -Scope "AllUsers" -Force -SkipPublisherCheck'
RUN pwsh -Command 'Install-PSResource -Name "Pester" -Repository "PSGallery" -Scope "AllUsers" -SkipDependencyCheck -TrustRepository -AcceptLicense'
RUN pwsh -Command 'Install-PSResource -Name "DSCParser" -Repository "PSGallery" -Scope "AllUsers" -SkipDependencyCheck -TrustRepository -AcceptLicense'
RUN pwsh -Command 'Install-PSResource -Name "M365DSC.PSDesiredStateConfiguration" -Repository "PSGallery" -Scope "AllUsers" -SkipDependencyCheck -TrustRepository -AcceptLicense'
RUN pwsh -Command ./Utilities/Install-PowerShell.ps1 -IsSDK
RUN pwsh -Command ./Utilities/Build-Microsoft365DSC.ps1
RUN pwsh -Command ./Utilities/Build-DllFiles.ps1 -Configuration Release
RUN pwsh -Command ./Utilities/Install-M365DSCAndDependencies.ps1 -IsSDK
ENTRYPOINT ["pwsh", "-NoLogo"]