-
-
Save guos/1cd399f007715ffd4f4aec98c749cda6 to your computer and use it in GitHub Desktop.
Revisions
-
dangtrinhnt created this gist
Apr 5, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2019 # install needed fonts for googlechrome to run properly ADD files/fonts.tar /Fonts/ WORKDIR /Fonts/ RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command ".\Add-Font.ps1 Fonts" WORKDIR "C:/ProgramData" # enable Web-WebSockets RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "Add-WindowsFeature Web-WebSockets" # install chocolately RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" -Y # install openjdk8 RUN choco install openjdk8 -Y # update environment variables RUN refreshenv # install googlechrome RUN choco install googlechrome -Y # copy your application to the WORKDIR ADD files/myapplication.war "C:/ProgramData" # copy chromedriver.exe to the same level of your application # assumming your application ADD files/drivers/chromedriver.exe "C:/ProgramData/drivers" EXPOSE 8080 # run your application CMD ["java", "-jar", "C:/ProgramData/myapplication.war"]