-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
28 lines (26 loc) · 1.23 KB
/
Dockerfile
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
# escape=`
FROM mcr.microsoft.com/windows/server:ltsc2022
ENV CHOCO_URL=https://chocolatey.org/install.ps1
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; `
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'; `
iex ((New-Object System.Net.WebClient).DownloadString("$env:CHOCO_URL"));"
RUN powershell -Command "choco install -y office-to-pdf; choco install -y office-tool"
WORKDIR C:\\odtsetup
COPY ./odtsetup/setup.exe .
COPY ./Office ./Office
ADD config.xml .
RUN setup.exe /configure C:\\odtsetup\\config.xml
WORKDIR /
COPY loginoffice.ps1 C:\\loginoffice.ps1
COPY entrypoint.cmd C:\\entrypoint.cmd
COPY test.ps1 C:\\test.ps1
ENV OFFICEUSER="null"
ENV OFFICEPASSWD="null"
RUN rmdir /s /q C:\\odtsetup
RUN powershell -Command "new-object -comobject word.application"
RUN mkdir C:\Windows\System32\config\systemprofile\Desktop
RUN powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force"
SHELL [ "powershell", "-Command"]
RUN Install-Module AzureAD -Confirm:$false -Force; Install-Module MSOnline -Confirm:$false -Force
ENTRYPOINT [ "C:\\entrypoint.cmd" ]