Skip to content

Instantly share code, notes, and snippets.

@skarllot
Forked from ashalkhakov/.gitlab-ci.yml
Created June 20, 2018 20:28
Show Gist options
  • Save skarllot/cc8c95474605bb99c07cd88c52506147 to your computer and use it in GitHub Desktop.
Save skarllot/cc8c95474605bb99c07cd88c52506147 to your computer and use it in GitHub Desktop.
Running .NET 3.5 CF builds under Docker for Windows
# this is the GitLab-CI file for building the image
variables:
CURRENT_IMAGE_TAG: rfid-applied/netcf35_build_environment:dev
stages:
- dockerize
dockerize:
stage: dockerize
script:
- docker build -t %CURRENT_IMAGE_TAG% .
- docker push %CURRENT_IMAGE_TAG%
- docker rmi %CURRENT_IMAGE_TAG%
tags:
- my-windows-containers-machine
FROM microsoft/dotnet-framework-build:3.5
# .NET Compact Framework 3.5 Redistributable:
# https://www.microsoft.com/en-us/download/details.aspx?id=65
RUN Invoke-WebRequest -Uri "https://download.microsoft.com/download/c/b/e/cbe1c611-7f2f-4bcf-921d-2df718591e1e/NETCFSetupv35.msi" -Out netfx35cf.msi
# we HAVE to install it like this, otherwise it won't wait for install
# to finish (UGH!)
RUN Start-Process -file "c:\netfx35cf.msi" -arg ' /qn /l*v c:\install_netfx35cf.txt' -passthru | wait-process
RUN "cat c:\install_netfx35cf.txt"
RUN "del c:\*netfx35cf.*"
# Power Toys for .NET Compact Framework 3.5:
RUN Invoke-WebRequest -Uri "https://download.microsoft.com/download/f/a/c/fac1342d-044d-4d88-ae97-d278ef697064/NETCFv35PowerToys.msi" -Out toys.msi
RUN Start-Process -file "c:\toys.msi" -arg ' /qn /l*v c:\install_toys.txt' -passthru | wait-process
RUN "cat c:\install_toys.txt"
RUN "del c:\*toys.*"
# NuGet
ADD "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" "c:\nuget.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment