├── .config └── dotnet-tools.json ├── .github └── workflows │ └── daily-build.yaml ├── .gitignore ├── .travis.yml ├── BuildInfo.fs ├── CI.fs ├── Daily.fs ├── DailyBuild.fs ├── Exec.fs ├── LICENSE ├── Logging.fs ├── Program.fs ├── README.md ├── ServiceProviderBinder.fs ├── UpdateInfo.fs ├── Utils.fs ├── Variables.fs ├── Versions.fs ├── aspnetcore-build-yarn.fsproj ├── build.fsx ├── daily-template ├── daily.spec.toml ├── runtime │ └── Dockerfile └── sdk │ ├── Dockerfile │ └── chromium.Dockerfile ├── daily ├── 5.0 │ ├── daily-build-info.toml │ ├── daily.spec.toml │ ├── runtime │ │ └── Dockerfile │ └── sdk │ │ ├── Dockerfile │ │ └── chromium.Dockerfile ├── 6.0 │ ├── daily-build-info.toml │ ├── daily.spec.toml │ ├── runtime │ │ └── Dockerfile │ └── sdk │ │ ├── Dockerfile │ │ └── chromium.Dockerfile ├── 7.0 │ ├── daily-build-info.toml │ ├── daily.spec.toml │ ├── runtime │ │ └── Dockerfile │ └── sdk │ │ ├── Dockerfile │ │ └── chromium.Dockerfile └── 8.0 │ ├── daily-build-info.toml │ ├── daily.spec.toml │ ├── runtime │ └── Dockerfile │ └── sdk │ ├── Dockerfile │ └── chromium.Dockerfile ├── docker.fs ├── paket.dependencies ├── paket.lock ├── paket.references ├── sample-release.json ├── sample.Dockerfile └── versions.toml /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "fake-cli": { 6 | "version": "5.22.0", 7 | "commands": [ 8 | "fake" 9 | ] 10 | }, 11 | "paket": { 12 | "version": "7.1.5", 13 | "commands": [ 14 | "paket" 15 | ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.github/workflows/daily-build.yaml: -------------------------------------------------------------------------------- 1 | name: daily-build 2 | on: 3 | push: 4 | schedule: 5 | - cron: '0 17 * * *' 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | - name: Log in to Docker Hub 12 | uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 13 | with: 14 | username: ${{ secrets.DOCKER_USERNAME }} 15 | password: ${{ secrets.DOCKER_PASSWORD }} 16 | - name: Setup .NET Core SDK 17 | uses: actions/setup-dotnet@v1.7.2 18 | with: 19 | dotnet-version: 6.0.x 20 | - name: Install dependencies 21 | run: | 22 | dotnet tool restore 23 | - name: Build 24 | run: | 25 | dotnet paket restore 26 | dotnet run -- daily 27 | env: 28 | GH_USER: ${{ secrets.GH_USER }} 29 | GH_TOKEN: ${{ secrets.GH_TOKEN }} 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | 263 | 264 | # Bundle Artifacts 265 | **/wwwroot/ts/**/*.js 266 | **/wwwroot/**/*.map 267 | **/wwwroot/lib/*.css 268 | ZeekoBlog/wwwroot/dist 269 | /ZeekoBlog/Properties/launchSettings.json 270 | *.DotSettings 271 | 272 | # FAKE 273 | packages/ 274 | .paket/ 275 | .fake/ 276 | 277 | # macOS 278 | .DS_Store 279 | 280 | # Ionide 281 | .ionide/ 282 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | language: csharp 3 | mono: none 4 | dist: xenial 5 | dotnet: 3.1 6 | 7 | env: 8 | - FAKE_DETAILED_ERRORS=true 9 | 10 | services: 11 | - docker 12 | 13 | before_install: 14 | - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin 15 | - dotnet tool restore 16 | 17 | jobs: 18 | include: 19 | # daily 20 | - stage: build daily images 21 | script: dotnet fake build -t daily 22 | -------------------------------------------------------------------------------- /BuildInfo.fs: -------------------------------------------------------------------------------- 1 | module CLI.BuildInfo 2 | 3 | open System 4 | open System.Text.RegularExpressions 5 | open FSharp.Data 6 | open System.Net.Http 7 | open Microsoft.FSharp.Control 8 | open FsToolkit.ErrorHandling 9 | 10 | let httpClient = new HttpClient() 11 | 12 | module DotNetRelease = 13 | type DotNetVersionInfo = { Version: string; FileHash: string } 14 | 15 | type DotNetRelease = 16 | { Sdk: DotNetVersionInfo 17 | Runtime: DotNetVersionInfo 18 | AspNetCore: DotNetVersionInfo } 19 | 20 | type ReleaseChannelIndex = 21 | JsonProvider 22 | 23 | let parseImageVersion str = 24 | let regex = 25 | Regex("""^\d+\.\d+\.\d+(-\w+(\.\d+)?)?""") 26 | 27 | (regex.Match(str)).Value 28 | 29 | let getIndex (version: string) = 30 | async { 31 | let! releaseInfo = 32 | ReleaseChannelIndex.AsyncLoad( 33 | sprintf 34 | "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/%s/releases.json" 35 | version 36 | ) 37 | 38 | let latestRelease = 39 | releaseInfo.Releases 40 | |> Seq.maxBy (fun x -> x.ReleaseDate) 41 | 42 | let findFileHash (arr: ReleaseChannelIndex.File array) = 43 | arr 44 | |> Seq.find (fun x -> x.Rid = "linux-musl-x64") 45 | 46 | let sdk: DotNetVersionInfo = 47 | { Version = latestRelease.Sdk.Version 48 | FileHash = (findFileHash latestRelease.Sdk.Files).Hash } 49 | 50 | let aspnetcoreRt: DotNetVersionInfo = 51 | { Version = latestRelease.AspnetcoreRuntime.Version 52 | FileHash = 53 | (findFileHash latestRelease.AspnetcoreRuntime.Files) 54 | .Hash } 55 | 56 | let runtime: DotNetVersionInfo = 57 | { Version = latestRelease.Runtime.Version 58 | FileHash = (findFileHash latestRelease.Runtime.Files).Hash } 59 | 60 | return 61 | { Sdk = sdk 62 | Runtime = runtime 63 | AspNetCore = aspnetcoreRt } 64 | } 65 | 66 | [] 67 | type BuildInfoOptions = { DotnetVersions: string seq } 68 | 69 | let getDepsInfo (services: IServiceProvider) (options: BuildInfoOptions) = 70 | let dotnetInfo version = 71 | async { 72 | let! dotnetRelease = DotNetRelease.getIndex version 73 | 74 | return 75 | seq { 76 | $"DotNet SDK: %A{dotnetRelease.Sdk}" 77 | $"AspNetCore Runtime: %A{dotnetRelease.AspNetCore}" 78 | 79 | $"SDK Image: %A{DotNetRelease.parseImageVersion dotnetRelease.Sdk.Version}" 80 | 81 | $"AspNetCore Runtime Image: %A{DotNetRelease.parseImageVersion dotnetRelease.AspNetCore.Version}" 82 | 83 | $"Runtime: %A{dotnetRelease.Runtime}" 84 | } 85 | } 86 | 87 | for v in options.DotnetVersions do 88 | dotnetInfo v 89 | |> Async.RunSynchronously 90 | |> Seq.iter (printfn "%s" ) 91 | -------------------------------------------------------------------------------- /CI.fs: -------------------------------------------------------------------------------- 1 | module CLI.CI 2 | 3 | open System 4 | open System.CommandLine 5 | open System.CommandLine.Binding 6 | open System.IO 7 | open Docker 8 | open Microsoft.Extensions.DependencyInjection 9 | open Microsoft.Extensions.Logging 10 | 11 | let command = Command("ci") 12 | 13 | module Build = 14 | let tagOpt = 15 | Option([| "-t"; "--tag" |], "image tag", IsRequired = true) 16 | 17 | let dockerfileOpt = 18 | Option( 19 | [| "-f"; "--dockerfile" |], 20 | "dockerfile to build", 21 | IsRequired = true 22 | ) 23 | 24 | let ctxPathOpt = 25 | Option( 26 | [| "-c"; "--context-dir" |], 27 | "docker build context dir", 28 | IsRequired = true 29 | ) 30 | 31 | let specOpt = 32 | Option( 33 | [| "-s"; "--spec" |], 34 | "build info specification file", 35 | IsRequired = true 36 | ) 37 | 38 | type BuildOptionBinder() = 39 | inherit BinderBase() 40 | 41 | override self.GetBoundValue(ctx) = 42 | let valueOf x = ctx.ParseResult.GetValueForOption x 43 | 44 | { Tag = valueOf tagOpt 45 | Dockerfile = valueOf dockerfileOpt 46 | ContextPath = valueOf ctxPathOpt 47 | Spec = valueOf specOpt } 48 | 49 | type ServiceProviderBinder() = 50 | inherit BinderBase() 51 | 52 | override self.GetBoundValue _ = 53 | let services = ServiceCollection() 54 | 55 | services.AddLogging (fun conf -> 56 | conf.AddFilter("ci", LogLevel.Debug).AddConsole() 57 | |> ignore) 58 | |> ignore 59 | 60 | services.BuildServiceProvider() 61 | 62 | let command = Command("build") 63 | 64 | let services = 65 | ServiceProviderBinder.registerServices ignore 66 | 67 | command.Add tagOpt 68 | command.Add dockerfileOpt 69 | command.Add ctxPathOpt 70 | command.Add specOpt 71 | 72 | let handler (opt: BuildOptions) (services: IServiceProvider) = 73 | ciBuild services opt 74 | 75 | command.SetHandler( 76 | handler, 77 | BuildOptionBinder(), 78 | services 79 | ) 80 | 81 | command.AddCommand Build.command 82 | -------------------------------------------------------------------------------- /Daily.fs: -------------------------------------------------------------------------------- 1 | module CLI.Daily 2 | 3 | open System 4 | open System.CommandLine 5 | 6 | let command = Command("daily") 7 | 8 | let handler (services: IServiceProvider) = 9 | let skipVersions = DailyBuild.getAllDailyBuildInfo [] 10 | let skipVersions = 11 | if Utils.checkTemplateUpdate() then 12 | List.empty 13 | else 14 | skipVersions 15 | skipVersions 16 | |> Seq.iter (printfn "%s is up to date, will be skipped") 17 | DailyBuild.buildAllDailyImages services skipVersions 18 | DailyBuild.commitChanges skipVersions 19 | 20 | let services = ServiceProviderBinder.registerServices ignore 21 | 22 | command.SetHandler (handler, services) 23 | -------------------------------------------------------------------------------- /DailyBuild.fs: -------------------------------------------------------------------------------- 1 | module DailyBuild 2 | 3 | open System 4 | open System.IO 5 | open CLI.CI 6 | open Nett 7 | 8 | open CLI.BuildInfo 9 | open CLI 10 | open Docker 11 | 12 | open Fake.IO 13 | open Fake.IO.FileSystemOperators 14 | open Fake.IO.Globbing.Operators 15 | 16 | [] 17 | type DailyBuildInfo = 18 | { AspNetCoreVersion: string 19 | AspNetImage: string 20 | SdkVersion: string 21 | SdkImage: string 22 | RuntimeVersion: string 23 | FetchTime: string } 24 | 25 | module Templating = 26 | let getAllTemplates () = !! "daily-template/**/*" 27 | 28 | let templatingFile (info: DailyBuildInfo) template = 29 | info.GetType().GetProperties() 30 | |> Seq.map (fun prop -> prop.Name, (prop.GetValue(info) :?> string)) 31 | |> Seq.fold 32 | (fun (templ: string) (propName, value) -> 33 | templ.Replace((sprintf "{{%s}}" propName), value)) 34 | template 35 | 36 | let renderAllTemplates dotnetVersion info = 37 | for templ in getAllTemplates () do 38 | let content = File.ReadAllText templ 39 | let rendered = templatingFile info content 40 | 41 | let outputPath = 42 | templ.Replace("daily-template", "daily" dotnetVersion) 43 | 44 | Directory.ensure (Directory.GetParent(outputPath).FullName) 45 | File.WriteAllText(outputPath, rendered) 46 | 47 | let dotnetDockerRepo (dotnetVersion: string) imgType (imgVersion: string) = 48 | if imgVersion.Contains "preview" then 49 | sprintf "mcr.microsoft.com/dotnet/nightly/%s:%s" imgType imgVersion 50 | else 51 | sprintf "mcr.microsoft.com/dotnet/%s:%s" imgType imgVersion 52 | 53 | 54 | 55 | let getDailyBuildInfo (dotnetVersion) = 56 | async { 57 | let! release = DotNetRelease.getIndex dotnetVersion 58 | let aspnet = release.AspNetCore 59 | let sdk = release.Sdk 60 | let runtime = release.Runtime 61 | 62 | let aspnetImage = 63 | DotNetRelease.parseImageVersion aspnet.Version 64 | 65 | let aspnetImage = 66 | dotnetDockerRepo dotnetVersion "aspnet" aspnetImage 67 | 68 | let sdkImage = 69 | DotNetRelease.parseImageVersion sdk.Version 70 | 71 | let sdkImage = 72 | dotnetDockerRepo dotnetVersion "sdk" sdkImage 73 | 74 | return 75 | { AspNetCoreVersion = aspnet.Version 76 | AspNetImage = aspnetImage 77 | SdkVersion = sdk.Version 78 | SdkImage = sdkImage 79 | RuntimeVersion = runtime.Version 80 | FetchTime = DateTime.Now.ToString("O") } 81 | } 82 | 83 | let trackingVersions = 84 | (Versions.readVersions ()).TrackingVersions 85 | 86 | let getPreviousInfo infoFile = 87 | if File.exists infoFile then 88 | File.readAsString infoFile 89 | |> Toml.ReadString 90 | |> Some 91 | else 92 | None 93 | 94 | let isBuildInfoEqual a b = 95 | printfn $"is equal {a} {b}" 96 | a = { b with FetchTime = a.FetchTime } 97 | 98 | let getAllDailyBuildInfo (skipVersions: string list) = 99 | seq { 100 | yield! skipVersions 101 | 102 | for version in trackingVersions do 103 | Directory.ensure ("daily" version) 104 | 105 | let infoFile = 106 | "daily" version "daily-build-info.toml" 107 | 108 | let info = 109 | getDailyBuildInfo version 110 | |> Async.RunSynchronously 111 | 112 | let shouldSkip = 113 | getPreviousInfo infoFile 114 | |> Option.map (isBuildInfoEqual info) 115 | |> Option.defaultValue false 116 | 117 | File.writeString false infoFile (Toml.WriteString info) 118 | Templating.renderAllTemplates version info 119 | 120 | if shouldSkip then yield version 121 | } 122 | |> List.ofSeq 123 | 124 | let buildDailyImages (services: IServiceProvider) dotnetVersion = 125 | 126 | [ { Tag = "zeekozhu/aspnetcore-build-yarn" 127 | Dockerfile = 128 | $"daily/{dotnetVersion}/sdk/Dockerfile" 129 | |> FileInfo 130 | ContextPath = $"./daily/{dotnetVersion}/sdk" |> DirectoryInfo 131 | Spec = $"./daily/{dotnetVersion}/daily.spec.toml" } 132 | { Tag = "zeekozhu/aspnetcore-build-yarn:chromium" 133 | Dockerfile = 134 | $"daily/{dotnetVersion}/sdk/chromium.Dockerfile" 135 | |> FileInfo 136 | ContextPath = $"./daily/{dotnetVersion}/sdk" |> DirectoryInfo 137 | Spec = $"./daily/{dotnetVersion}/daily.spec.toml" } 138 | { Tag = "zeekozhu/aspnetcore-node" 139 | Dockerfile = 140 | $"daily/{dotnetVersion}/runtime/Dockerfile" 141 | |> FileInfo 142 | ContextPath = 143 | $"./daily/{dotnetVersion}/runtime" 144 | |> DirectoryInfo 145 | Spec = $"./daily/{dotnetVersion}/daily.spec.toml" } ] 146 | |> List.iter (fun it -> Build.handler it services) 147 | 148 | let buildAllDailyImages 149 | (services: IServiceProvider) 150 | (skipVersions: string seq) 151 | = 152 | 153 | trackingVersions 154 | |> Seq.except skipVersions 155 | |> Seq.iter (buildDailyImages services) 156 | 157 | let commitChanges (skipVersions: string seq) = 158 | let skipCommit = 159 | trackingVersions 160 | |> Seq.except skipVersions 161 | |> Seq.isEmpty 162 | 163 | if not skipCommit then 164 | let now = DateTime.Now.ToString("O") 165 | Exec.run "git" [ "config"; "user.name"; "ZeekoZhu" ] 166 | 167 | Exec.run 168 | "git" 169 | [ "config" 170 | "user.email" 171 | "vaezt@outlook.com" ] 172 | 173 | Exec.run "git" [ "add"; "." ] 174 | Exec.run "git" [ "commit"; "-m"; "DailyBuild: " + now ] 175 | Utils.gitPush () 176 | else 177 | () 178 | -------------------------------------------------------------------------------- /Exec.fs: -------------------------------------------------------------------------------- 1 | module CLI.Exec 2 | 3 | open SimpleExec 4 | 5 | let run p (args: string seq) = Command.Run(p, args) 6 | 7 | let readAsync p (args: string seq) = 8 | async { 9 | let! out, _ = Command.ReadAsync(p, args) |> Async.AwaitTask 10 | return out 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Logging.fs: -------------------------------------------------------------------------------- 1 | [] 2 | module CLI.Logging 3 | 4 | open Microsoft.Extensions.Logging 5 | 6 | type ILogger with 7 | member self.info (s: string) = 8 | self.LogInformation s 9 | -------------------------------------------------------------------------------- /Program.fs: -------------------------------------------------------------------------------- 1 | open System.CommandLine 2 | open CLI 3 | 4 | let rootCmd = RootCommand() 5 | 6 | rootCmd.AddCommand CI.command 7 | rootCmd.AddCommand UpdateInfo.command 8 | rootCmd.AddCommand Daily.command 9 | 10 | let [] main args = 11 | rootCmd.Invoke args 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aspnetcore-build-yarn 2 | 3 | [![Build Status](https://travis-ci.org/ZeekoZhu/aspnetcore-build-yarn.svg)](https://travis-ci.org/ZeekoZhu/aspnetcore-build-yarn) 4 | 5 | *alpine based image are removed due to https://github.com/volta-cli/volta/issues/473* 6 | 7 | ## Tags 8 | 9 | ### [aspnetcore-build-yarn](https://hub.docker.com/r/zeekozhu/aspnetcore-build-yarn/) 10 | 11 | Official dotnet-sdk docker image with [volta](https://volta.sh/) installed. 12 | 13 | ### [aspnetcore-node](https://hub.docker.com/r/zeekozhu/aspnetcore-node/) 14 | 15 | Official aspnetcore runtime docker image with [volta](https://volta.sh/) installed. 16 | 17 | ## Build everyday 18 | 19 | This project use travis CI to create daily build ensure all dependencies are update to date with upstream. More details can be found in specifications: 20 | 21 | - [5.0.spec.toml](https://github.com/ZeekoZhu/aspnetcore-build-yarn/blob/master/daily/5.0/daily.spec.toml) 22 | - [6.0.spec.toml](https://github.com/ZeekoZhu/aspnetcore-build-yarn/blob/master/daily/6.0/daily.spec.toml) 23 | -------------------------------------------------------------------------------- /ServiceProviderBinder.fs: -------------------------------------------------------------------------------- 1 | module CLI.ServiceProviderBinder 2 | 3 | open System 4 | open System.CommandLine.Binding 5 | open Microsoft.Extensions.DependencyInjection 6 | open Microsoft.Extensions.Logging 7 | 8 | type internal ServiceProviderBinder(builder: IServiceCollection -> unit) = 9 | inherit BinderBase() 10 | 11 | override self.GetBoundValue _ = 12 | let services = ServiceCollection() 13 | builder services 14 | 15 | services.AddLogging (fun conf -> 16 | conf.AddFilter("ci", LogLevel.Debug).AddConsole() 17 | |> ignore) 18 | |> ignore 19 | 20 | let result = services.BuildServiceProvider() 21 | result 22 | 23 | let registerServices (builder: IServiceCollection -> unit) = 24 | ServiceProviderBinder(builder) :> BinderBase 25 | -------------------------------------------------------------------------------- /UpdateInfo.fs: -------------------------------------------------------------------------------- 1 | module CLI.UpdateInfo 2 | 3 | open System 4 | open System.CommandLine 5 | 6 | let command = Command("update-info") 7 | 8 | let private versionsOpt = 9 | Option([| "-d"; "--dotnet" |], IsRequired = true) 10 | 11 | command.Add(versionsOpt) 12 | 13 | let handler (versions: string seq) (services: IServiceProvider) = 14 | BuildInfo.getDepsInfo services { DotnetVersions = versions } 15 | 16 | let services = 17 | ServiceProviderBinder.registerServices ignore 18 | 19 | command.SetHandler(handler, versionsOpt, services) 20 | -------------------------------------------------------------------------------- /Utils.fs: -------------------------------------------------------------------------------- 1 | module Utils 2 | 3 | open System 4 | open SimpleExec 5 | 6 | 7 | let dockerCmd (subCmd: string) (args: string list) = 8 | Command.Run("docker", subCmd :: args) 9 | 10 | let runGitCmd (command: string) = 11 | task { 12 | let! out, _ = Command.ReadAsync("git", command, workingDirectory = "./") 13 | return out 14 | } 15 | |> Async.AwaitTask 16 | |> Async.RunSynchronously 17 | 18 | 19 | let getLatestTag () = 20 | let revListResult = 21 | runGitCmd "rev-list --tags --max-count=1" 22 | 23 | let tagName = 24 | runGitCmd $"describe --tags %s{revListResult}" 25 | 26 | tagName 27 | 28 | let gitPush () = 29 | let gitUsr = 30 | Environment.GetEnvironmentVariable "GITHUB_USER" 31 | 32 | let gitToken = 33 | Environment.GetEnvironmentVariable "GITHUB_TOKEN" 34 | 35 | let branch = 36 | Environment.GetEnvironmentVariable "GITHUB_REF" 37 | 38 | Command.Run( 39 | "git", 40 | [ "push" 41 | $"https://%s{gitUsr}:%s{gitToken}@github.com/ZeekoZhu/aspnetcore-build-yarn" 42 | $"HEAD:%s{branch}" ] 43 | ) 44 | 45 | let checkTemplateUpdate () = 46 | let changed = runGitCmd "ls-files -m" 47 | printfn $"{changed}" 48 | changed.Contains "daily-template/" 49 | 50 | let failIfError = 51 | function 52 | | Result.Ok value -> value 53 | | Result.Error err -> failwith $"%A{err}" 54 | 55 | -------------------------------------------------------------------------------- /Variables.fs: -------------------------------------------------------------------------------- 1 | module CLI.Variables 2 | 3 | let BuildParams = "BuildParams" 4 | 5 | let ScriptRoot = __SOURCE_DIRECTORY__ 6 | -------------------------------------------------------------------------------- /Versions.fs: -------------------------------------------------------------------------------- 1 | module CLI.Versions 2 | 3 | 4 | open Nett 5 | open Fake.IO 6 | 7 | [] 8 | type VersionsConfig = 9 | { TrackingVersions: string [] 10 | Latest: string 11 | } 12 | 13 | let readVersions () = 14 | File.readAsString "./versions.toml" 15 | |> Toml.ReadString 16 | -------------------------------------------------------------------------------- /aspnetcore-build-yarn.fsproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0 6 | CLI 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | PreserveNewest 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /build.fsx: -------------------------------------------------------------------------------- 1 | #load ".fake/build.fsx/intellisense.fsx" 2 | #load "./utils.fsx" 3 | #load "./build-info.fsx" 4 | #load "./daily-build.fsx" 5 | #load "./docker.fsx" 6 | 7 | open Fake.Core 8 | open Fake.Core.TargetOperators 9 | open Fake.MyFakeTools 10 | 11 | // ---------------------- 12 | // Targets 13 | // ---------------------- 14 | 15 | Target.useTriggerCI () 16 | 17 | Target.create "CI:Build" (fun p -> Utils.handleCli p.Context.Arguments Docker.ciBuild) 18 | 19 | Target.create "CI:Test" (fun _ -> Docker.testImage()) 20 | 21 | Target.create "CI:Publish" (fun _ -> Docker.publishImage()) 22 | 23 | Target.create "update:info" (fun p -> 24 | Utils.handleCli p.Context.Arguments BuildInfo.getDepsInfo 25 | ) 26 | 27 | Target.create "CI" ignore 28 | 29 | "CI:Build" ==> "CI:Test" ==> "CI:Publish" ==> "CI" 30 | 31 | Target.create "daily:prepare" (fun _ -> 32 | FakeVar.set "SkipVersions" List.empty 33 | DailyBuild.getAllDailyBuildInfo () 34 | if Utils.checkTemplateUpdate() then 35 | FakeVar.set "SkipVersions" List.empty 36 | FakeVar.getOrFail "SkipVersions" 37 | |> Seq.iter (Trace.tracefn "%s is up to date, will be skipped") 38 | ) 39 | 40 | Target.create "daily:build" ( fun _ -> 41 | DailyBuild.buildAllDailyImages () 42 | ) 43 | 44 | Target.create "daily:commit" ( fun _ -> 45 | DailyBuild.commitChanges () 46 | ) 47 | 48 | Target.create "daily" ignore 49 | 50 | "daily:prepare" ==> "daily:build" 51 | ==> "daily:commit" ==> "daily" 52 | 53 | Target.create "Empty" ignore 54 | 55 | Target.runOrDefaultWithArguments "Empty" 56 | -------------------------------------------------------------------------------- /daily-template/daily.spec.toml: -------------------------------------------------------------------------------- 1 | [[Images]] 2 | Name = "zeekozhu/aspnetcore-build-yarn" 3 | Tag = "zeekozhu/aspnetcore-build-yarn" 4 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp" 5 | Dotnet = "{{SdkVersion}}" 6 | Node = "v{{NodeVersion}}" 7 | Yarn = "{{YarnVersion}}" 8 | Sdk = true 9 | Suffix = "" 10 | Latest = true 11 | SkipTest = false 12 | 13 | [[Images]] 14 | Name = "zeekozhu/aspnetcore-build-yarn:chromium" 15 | Tag = "zeekozhu/aspnetcore-build-yarn" 16 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-chromium" 17 | Dotnet = "{{SdkVersion}}" 18 | Node = "v{{NodeVersion}}" 19 | Yarn = "{{YarnVersion}}" 20 | Sdk = true 21 | Suffix = "chromium" 22 | Latest = false 23 | SkipTest = false 24 | 25 | [[Images]] 26 | Name = "zeekozhu/aspnetcore-node" 27 | Tag = "zeekozhu/aspnetcore-node" 28 | TestImage = "zeekozhu/aspnetcore-node:tmp" 29 | Dotnet = "{{AspNetCoreVersion}}" 30 | Node = "v{{NodeVersion}}" 31 | Yarn = "{{YarnVersion}}" 32 | Sdk = false 33 | Suffix = "" 34 | Latest = true 35 | SkipTest = false 36 | 37 | [[Images]] 38 | Name = "zeekozhu/aspnetcore-node:alpine" 39 | Tag = "zeekozhu/aspnetcore-node" 40 | TestImage = "zeekozhu/aspnetcore-node:tmp-alpine" 41 | Dotnet = "{{AspNetCoreVersion}}" 42 | Node = "v{{NodeVersion}}" 43 | Yarn = "{{YarnVersion}}" 44 | Sdk = false 45 | Suffix = "alpine" 46 | Latest = false 47 | SkipTest = false 48 | 49 | [[Images]] 50 | Name = "zeekozhu/aspnetcore-build-yarn:alpine" 51 | Tag = "zeekozhu/aspnetcore-build-yarn" 52 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-alpine" 53 | Dotnet = "{{SdkVersion}}" 54 | Node = "v{{NodeVersion}}" 55 | Yarn = "{{YarnVersion}}" 56 | Sdk = true 57 | Suffix = "alpine" 58 | Latest = false 59 | SkipTest = false 60 | 61 | [[Images]] 62 | Name = "zeekozhu/aspnetcore-node-deps" 63 | Tag = "zeekozhu/aspnetcore-node-deps" 64 | TestImage = "zeekozhu/aspnetcore-node-deps:tmp" 65 | Dotnet = "{{AspNetCoreVersion}}" 66 | Node = "v{{NodeVersion}}" 67 | Yarn = "{{YarnVersion}}" 68 | Sdk = false 69 | Suffix = "" 70 | Latest = false 71 | SkipTest = true 72 | -------------------------------------------------------------------------------- /daily-template/runtime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM {{AspNetImage}} 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 5 | 6 | RUN apt-get -qq update \ 7 | && apt-get install -y wget curl --no-install-recommends \ 8 | && rm -rf /var/lib/apt/lists/ \ 9 | && apt-get clean 10 | 11 | # install volta 12 | RUN curl https://get.volta.sh | bash 13 | 14 | ENV VOLTA_HOME=/root/.volta 15 | ENV PATH=$VOLTA_HOME/bin:$PATH 16 | 17 | RUN volta install node@latest \ 18 | && volta install yarn@latest \ 19 | && volta list -d --format plain 20 | 21 | WORKDIR / 22 | -------------------------------------------------------------------------------- /daily-template/sdk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM {{SdkImage}} 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" 15 | 16 | RUN apt-get -qq update \ 17 | && apt-get install -y build-essential --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # install volta 21 | RUN curl https://get.volta.sh | bash 22 | 23 | ENV VOLTA_HOME=/root/.volta 24 | ENV PATH=$VOLTA_HOME/bin:$PATH 25 | 26 | RUN volta install node@latest \ 27 | && volta install yarn@latest \ 28 | && volta list -d --format plain 29 | 30 | # Trigger first run experience by running arbitrary cmd to populate local package cache 31 | RUN dotnet help \ 32 | && dotnet tool install -g paket 33 | 34 | WORKDIR / 35 | -------------------------------------------------------------------------------- /daily-template/sdk/chromium.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM {{SdkImage}} 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" \ 15 | CHROME_BIN=/usr/bin/chromium 16 | 17 | # install volta 18 | RUN curl https://get.volta.sh | bash 19 | 20 | ENV VOLTA_HOME=/root/.volta 21 | ENV PATH=$VOLTA_HOME/bin:$PATH 22 | 23 | RUN volta install node@latest \ 24 | && volta install yarn@latest \ 25 | && volta list -d --format plain 26 | 27 | # Install chromium 28 | RUN apt-get -qq update \ 29 | && apt-get install -y chromium build-essential --no-install-recommends \ 30 | && rm -rf /var/lib/apt/lists/* 31 | 32 | # Trigger first run experience by running arbitrary cmd to populate local package cache 33 | RUN dotnet help \ 34 | && dotnet tool install -g paket 35 | 36 | WORKDIR / 37 | -------------------------------------------------------------------------------- /daily/5.0/daily-build-info.toml: -------------------------------------------------------------------------------- 1 | AspNetCoreVersion = "5.0.17" 2 | AspNetImage = "mcr.microsoft.com/dotnet/aspnet:5.0.17" 3 | SdkVersion = "5.0.408" 4 | SdkImage = "mcr.microsoft.com/dotnet/sdk:5.0.408" 5 | RuntimeVersion = "5.0.17" 6 | FetchTime = "2023-02-15T17:01:20.5213705+00:00" 7 | -------------------------------------------------------------------------------- /daily/5.0/daily.spec.toml: -------------------------------------------------------------------------------- 1 | [[Images]] 2 | Name = "zeekozhu/aspnetcore-build-yarn" 3 | Tag = "zeekozhu/aspnetcore-build-yarn" 4 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp" 5 | Dotnet = "5.0.408" 6 | Node = "v{{NodeVersion}}" 7 | Yarn = "{{YarnVersion}}" 8 | Sdk = true 9 | Suffix = "" 10 | Latest = true 11 | SkipTest = false 12 | 13 | [[Images]] 14 | Name = "zeekozhu/aspnetcore-build-yarn:chromium" 15 | Tag = "zeekozhu/aspnetcore-build-yarn" 16 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-chromium" 17 | Dotnet = "5.0.408" 18 | Node = "v{{NodeVersion}}" 19 | Yarn = "{{YarnVersion}}" 20 | Sdk = true 21 | Suffix = "chromium" 22 | Latest = false 23 | SkipTest = false 24 | 25 | [[Images]] 26 | Name = "zeekozhu/aspnetcore-node" 27 | Tag = "zeekozhu/aspnetcore-node" 28 | TestImage = "zeekozhu/aspnetcore-node:tmp" 29 | Dotnet = "5.0.17" 30 | Node = "v{{NodeVersion}}" 31 | Yarn = "{{YarnVersion}}" 32 | Sdk = false 33 | Suffix = "" 34 | Latest = true 35 | SkipTest = false 36 | 37 | [[Images]] 38 | Name = "zeekozhu/aspnetcore-node:alpine" 39 | Tag = "zeekozhu/aspnetcore-node" 40 | TestImage = "zeekozhu/aspnetcore-node:tmp-alpine" 41 | Dotnet = "5.0.17" 42 | Node = "v{{NodeVersion}}" 43 | Yarn = "{{YarnVersion}}" 44 | Sdk = false 45 | Suffix = "alpine" 46 | Latest = false 47 | SkipTest = false 48 | 49 | [[Images]] 50 | Name = "zeekozhu/aspnetcore-build-yarn:alpine" 51 | Tag = "zeekozhu/aspnetcore-build-yarn" 52 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-alpine" 53 | Dotnet = "5.0.408" 54 | Node = "v{{NodeVersion}}" 55 | Yarn = "{{YarnVersion}}" 56 | Sdk = true 57 | Suffix = "alpine" 58 | Latest = false 59 | SkipTest = false 60 | 61 | [[Images]] 62 | Name = "zeekozhu/aspnetcore-node-deps" 63 | Tag = "zeekozhu/aspnetcore-node-deps" 64 | TestImage = "zeekozhu/aspnetcore-node-deps:tmp" 65 | Dotnet = "5.0.17" 66 | Node = "v{{NodeVersion}}" 67 | Yarn = "{{YarnVersion}}" 68 | Sdk = false 69 | Suffix = "" 70 | Latest = false 71 | SkipTest = true 72 | -------------------------------------------------------------------------------- /daily/5.0/runtime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:5.0.17 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 5 | 6 | RUN apt-get -qq update \ 7 | && apt-get install -y wget curl --no-install-recommends \ 8 | && rm -rf /var/lib/apt/lists/ \ 9 | && apt-get clean 10 | 11 | # install volta 12 | RUN curl https://get.volta.sh | bash 13 | 14 | ENV VOLTA_HOME=/root/.volta 15 | ENV PATH=$VOLTA_HOME/bin:$PATH 16 | 17 | RUN volta install node@latest \ 18 | && volta install yarn@latest \ 19 | && volta list -d --format plain 20 | 21 | WORKDIR / 22 | -------------------------------------------------------------------------------- /daily/5.0/sdk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0.408 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" 15 | 16 | RUN apt-get -qq update \ 17 | && apt-get install -y build-essential --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # install volta 21 | RUN curl https://get.volta.sh | bash 22 | 23 | ENV VOLTA_HOME=/root/.volta 24 | ENV PATH=$VOLTA_HOME/bin:$PATH 25 | 26 | RUN volta install node@latest \ 27 | && volta install yarn@latest \ 28 | && volta list -d --format plain 29 | 30 | # Trigger first run experience by running arbitrary cmd to populate local package cache 31 | RUN dotnet help \ 32 | && dotnet tool install -g paket 33 | 34 | WORKDIR / 35 | -------------------------------------------------------------------------------- /daily/5.0/sdk/chromium.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:5.0.408 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" \ 15 | CHROME_BIN=/usr/bin/chromium 16 | 17 | # install volta 18 | RUN curl https://get.volta.sh | bash 19 | 20 | ENV VOLTA_HOME=/root/.volta 21 | ENV PATH=$VOLTA_HOME/bin:$PATH 22 | 23 | RUN volta install node@latest \ 24 | && volta install yarn@latest \ 25 | && volta list -d --format plain 26 | 27 | # Install chromium 28 | RUN apt-get -qq update \ 29 | && apt-get install -y chromium build-essential --no-install-recommends \ 30 | && rm -rf /var/lib/apt/lists/* 31 | 32 | # Trigger first run experience by running arbitrary cmd to populate local package cache 33 | RUN dotnet help \ 34 | && dotnet tool install -g paket 35 | 36 | WORKDIR / 37 | -------------------------------------------------------------------------------- /daily/6.0/daily-build-info.toml: -------------------------------------------------------------------------------- 1 | AspNetCoreVersion = "6.0.33" 2 | AspNetImage = "mcr.microsoft.com/dotnet/aspnet:6.0.33" 3 | SdkVersion = "6.0.425" 4 | SdkImage = "mcr.microsoft.com/dotnet/sdk:6.0.425" 5 | RuntimeVersion = "6.0.33" 6 | FetchTime = "2024-09-24T17:07:56.4131033+00:00" 7 | -------------------------------------------------------------------------------- /daily/6.0/daily.spec.toml: -------------------------------------------------------------------------------- 1 | [[Images]] 2 | Name = "zeekozhu/aspnetcore-build-yarn" 3 | Tag = "zeekozhu/aspnetcore-build-yarn" 4 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp" 5 | Dotnet = "6.0.425" 6 | Node = "v{{NodeVersion}}" 7 | Yarn = "{{YarnVersion}}" 8 | Sdk = true 9 | Suffix = "" 10 | Latest = true 11 | SkipTest = false 12 | 13 | [[Images]] 14 | Name = "zeekozhu/aspnetcore-build-yarn:chromium" 15 | Tag = "zeekozhu/aspnetcore-build-yarn" 16 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-chromium" 17 | Dotnet = "6.0.425" 18 | Node = "v{{NodeVersion}}" 19 | Yarn = "{{YarnVersion}}" 20 | Sdk = true 21 | Suffix = "chromium" 22 | Latest = false 23 | SkipTest = false 24 | 25 | [[Images]] 26 | Name = "zeekozhu/aspnetcore-node" 27 | Tag = "zeekozhu/aspnetcore-node" 28 | TestImage = "zeekozhu/aspnetcore-node:tmp" 29 | Dotnet = "6.0.33" 30 | Node = "v{{NodeVersion}}" 31 | Yarn = "{{YarnVersion}}" 32 | Sdk = false 33 | Suffix = "" 34 | Latest = true 35 | SkipTest = false 36 | 37 | [[Images]] 38 | Name = "zeekozhu/aspnetcore-node:alpine" 39 | Tag = "zeekozhu/aspnetcore-node" 40 | TestImage = "zeekozhu/aspnetcore-node:tmp-alpine" 41 | Dotnet = "6.0.33" 42 | Node = "v{{NodeVersion}}" 43 | Yarn = "{{YarnVersion}}" 44 | Sdk = false 45 | Suffix = "alpine" 46 | Latest = false 47 | SkipTest = false 48 | 49 | [[Images]] 50 | Name = "zeekozhu/aspnetcore-build-yarn:alpine" 51 | Tag = "zeekozhu/aspnetcore-build-yarn" 52 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-alpine" 53 | Dotnet = "6.0.425" 54 | Node = "v{{NodeVersion}}" 55 | Yarn = "{{YarnVersion}}" 56 | Sdk = true 57 | Suffix = "alpine" 58 | Latest = false 59 | SkipTest = false 60 | 61 | [[Images]] 62 | Name = "zeekozhu/aspnetcore-node-deps" 63 | Tag = "zeekozhu/aspnetcore-node-deps" 64 | TestImage = "zeekozhu/aspnetcore-node-deps:tmp" 65 | Dotnet = "6.0.33" 66 | Node = "v{{NodeVersion}}" 67 | Yarn = "{{YarnVersion}}" 68 | Sdk = false 69 | Suffix = "" 70 | Latest = false 71 | SkipTest = true 72 | -------------------------------------------------------------------------------- /daily/6.0/runtime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:6.0.33 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 5 | 6 | RUN apt-get -qq update \ 7 | && apt-get install -y wget curl --no-install-recommends \ 8 | && rm -rf /var/lib/apt/lists/ \ 9 | && apt-get clean 10 | 11 | # install volta 12 | RUN curl https://get.volta.sh | bash 13 | 14 | ENV VOLTA_HOME=/root/.volta 15 | ENV PATH=$VOLTA_HOME/bin:$PATH 16 | 17 | RUN volta install node@latest \ 18 | && volta install yarn@latest \ 19 | && volta list -d --format plain 20 | 21 | WORKDIR / 22 | -------------------------------------------------------------------------------- /daily/6.0/sdk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:6.0.425 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" 15 | 16 | RUN apt-get -qq update \ 17 | && apt-get install -y build-essential --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # install volta 21 | RUN curl https://get.volta.sh | bash 22 | 23 | ENV VOLTA_HOME=/root/.volta 24 | ENV PATH=$VOLTA_HOME/bin:$PATH 25 | 26 | RUN volta install node@latest \ 27 | && volta install yarn@latest \ 28 | && volta list -d --format plain 29 | 30 | # Trigger first run experience by running arbitrary cmd to populate local package cache 31 | RUN dotnet help \ 32 | && dotnet tool install -g paket 33 | 34 | WORKDIR / 35 | -------------------------------------------------------------------------------- /daily/6.0/sdk/chromium.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:6.0.425 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" \ 15 | CHROME_BIN=/usr/bin/chromium 16 | 17 | # install volta 18 | RUN curl https://get.volta.sh | bash 19 | 20 | ENV VOLTA_HOME=/root/.volta 21 | ENV PATH=$VOLTA_HOME/bin:$PATH 22 | 23 | RUN volta install node@latest \ 24 | && volta install yarn@latest \ 25 | && volta list -d --format plain 26 | 27 | # Install chromium 28 | RUN apt-get -qq update \ 29 | && apt-get install -y chromium build-essential --no-install-recommends \ 30 | && rm -rf /var/lib/apt/lists/* 31 | 32 | # Trigger first run experience by running arbitrary cmd to populate local package cache 33 | RUN dotnet help \ 34 | && dotnet tool install -g paket 35 | 36 | WORKDIR / 37 | -------------------------------------------------------------------------------- /daily/7.0/daily-build-info.toml: -------------------------------------------------------------------------------- 1 | AspNetCoreVersion = "7.0.20" 2 | AspNetImage = "mcr.microsoft.com/dotnet/aspnet:7.0.20" 3 | SdkVersion = "7.0.410" 4 | SdkImage = "mcr.microsoft.com/dotnet/sdk:7.0.410" 5 | RuntimeVersion = "7.0.20" 6 | FetchTime = "2024-09-24T17:07:57.3290136+00:00" 7 | -------------------------------------------------------------------------------- /daily/7.0/daily.spec.toml: -------------------------------------------------------------------------------- 1 | [[Images]] 2 | Name = "zeekozhu/aspnetcore-build-yarn" 3 | Tag = "zeekozhu/aspnetcore-build-yarn" 4 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp" 5 | Dotnet = "7.0.410" 6 | Node = "v{{NodeVersion}}" 7 | Yarn = "{{YarnVersion}}" 8 | Sdk = true 9 | Suffix = "" 10 | Latest = true 11 | SkipTest = false 12 | 13 | [[Images]] 14 | Name = "zeekozhu/aspnetcore-build-yarn:chromium" 15 | Tag = "zeekozhu/aspnetcore-build-yarn" 16 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-chromium" 17 | Dotnet = "7.0.410" 18 | Node = "v{{NodeVersion}}" 19 | Yarn = "{{YarnVersion}}" 20 | Sdk = true 21 | Suffix = "chromium" 22 | Latest = false 23 | SkipTest = false 24 | 25 | [[Images]] 26 | Name = "zeekozhu/aspnetcore-node" 27 | Tag = "zeekozhu/aspnetcore-node" 28 | TestImage = "zeekozhu/aspnetcore-node:tmp" 29 | Dotnet = "7.0.20" 30 | Node = "v{{NodeVersion}}" 31 | Yarn = "{{YarnVersion}}" 32 | Sdk = false 33 | Suffix = "" 34 | Latest = true 35 | SkipTest = false 36 | 37 | [[Images]] 38 | Name = "zeekozhu/aspnetcore-node:alpine" 39 | Tag = "zeekozhu/aspnetcore-node" 40 | TestImage = "zeekozhu/aspnetcore-node:tmp-alpine" 41 | Dotnet = "7.0.20" 42 | Node = "v{{NodeVersion}}" 43 | Yarn = "{{YarnVersion}}" 44 | Sdk = false 45 | Suffix = "alpine" 46 | Latest = false 47 | SkipTest = false 48 | 49 | [[Images]] 50 | Name = "zeekozhu/aspnetcore-build-yarn:alpine" 51 | Tag = "zeekozhu/aspnetcore-build-yarn" 52 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-alpine" 53 | Dotnet = "7.0.410" 54 | Node = "v{{NodeVersion}}" 55 | Yarn = "{{YarnVersion}}" 56 | Sdk = true 57 | Suffix = "alpine" 58 | Latest = false 59 | SkipTest = false 60 | 61 | [[Images]] 62 | Name = "zeekozhu/aspnetcore-node-deps" 63 | Tag = "zeekozhu/aspnetcore-node-deps" 64 | TestImage = "zeekozhu/aspnetcore-node-deps:tmp" 65 | Dotnet = "7.0.20" 66 | Node = "v{{NodeVersion}}" 67 | Yarn = "{{YarnVersion}}" 68 | Sdk = false 69 | Suffix = "" 70 | Latest = false 71 | SkipTest = true 72 | -------------------------------------------------------------------------------- /daily/7.0/runtime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:7.0.20 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 5 | 6 | RUN apt-get -qq update \ 7 | && apt-get install -y wget curl --no-install-recommends \ 8 | && rm -rf /var/lib/apt/lists/ \ 9 | && apt-get clean 10 | 11 | # install volta 12 | RUN curl https://get.volta.sh | bash 13 | 14 | ENV VOLTA_HOME=/root/.volta 15 | ENV PATH=$VOLTA_HOME/bin:$PATH 16 | 17 | RUN volta install node@latest \ 18 | && volta install yarn@latest \ 19 | && volta list -d --format plain 20 | 21 | WORKDIR / 22 | -------------------------------------------------------------------------------- /daily/7.0/sdk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:7.0.410 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" 15 | 16 | RUN apt-get -qq update \ 17 | && apt-get install -y build-essential --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # install volta 21 | RUN curl https://get.volta.sh | bash 22 | 23 | ENV VOLTA_HOME=/root/.volta 24 | ENV PATH=$VOLTA_HOME/bin:$PATH 25 | 26 | RUN volta install node@latest \ 27 | && volta install yarn@latest \ 28 | && volta list -d --format plain 29 | 30 | # Trigger first run experience by running arbitrary cmd to populate local package cache 31 | RUN dotnet help \ 32 | && dotnet tool install -g paket 33 | 34 | WORKDIR / 35 | -------------------------------------------------------------------------------- /daily/7.0/sdk/chromium.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:7.0.410 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" \ 15 | CHROME_BIN=/usr/bin/chromium 16 | 17 | # install volta 18 | RUN curl https://get.volta.sh | bash 19 | 20 | ENV VOLTA_HOME=/root/.volta 21 | ENV PATH=$VOLTA_HOME/bin:$PATH 22 | 23 | RUN volta install node@latest \ 24 | && volta install yarn@latest \ 25 | && volta list -d --format plain 26 | 27 | # Install chromium 28 | RUN apt-get -qq update \ 29 | && apt-get install -y chromium build-essential --no-install-recommends \ 30 | && rm -rf /var/lib/apt/lists/* 31 | 32 | # Trigger first run experience by running arbitrary cmd to populate local package cache 33 | RUN dotnet help \ 34 | && dotnet tool install -g paket 35 | 36 | WORKDIR / 37 | -------------------------------------------------------------------------------- /daily/8.0/daily-build-info.toml: -------------------------------------------------------------------------------- 1 | AspNetCoreVersion = "8.0.8" 2 | AspNetImage = "mcr.microsoft.com/dotnet/aspnet:8.0.8" 3 | SdkVersion = "8.0.402" 4 | SdkImage = "mcr.microsoft.com/dotnet/sdk:8.0.402" 5 | RuntimeVersion = "8.0.8" 6 | FetchTime = "2024-09-24T17:07:58.0687813+00:00" 7 | -------------------------------------------------------------------------------- /daily/8.0/daily.spec.toml: -------------------------------------------------------------------------------- 1 | [[Images]] 2 | Name = "zeekozhu/aspnetcore-build-yarn" 3 | Tag = "zeekozhu/aspnetcore-build-yarn" 4 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp" 5 | Dotnet = "8.0.402" 6 | Node = "v{{NodeVersion}}" 7 | Yarn = "{{YarnVersion}}" 8 | Sdk = true 9 | Suffix = "" 10 | Latest = true 11 | SkipTest = false 12 | 13 | [[Images]] 14 | Name = "zeekozhu/aspnetcore-build-yarn:chromium" 15 | Tag = "zeekozhu/aspnetcore-build-yarn" 16 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-chromium" 17 | Dotnet = "8.0.402" 18 | Node = "v{{NodeVersion}}" 19 | Yarn = "{{YarnVersion}}" 20 | Sdk = true 21 | Suffix = "chromium" 22 | Latest = false 23 | SkipTest = false 24 | 25 | [[Images]] 26 | Name = "zeekozhu/aspnetcore-node" 27 | Tag = "zeekozhu/aspnetcore-node" 28 | TestImage = "zeekozhu/aspnetcore-node:tmp" 29 | Dotnet = "8.0.8" 30 | Node = "v{{NodeVersion}}" 31 | Yarn = "{{YarnVersion}}" 32 | Sdk = false 33 | Suffix = "" 34 | Latest = true 35 | SkipTest = false 36 | 37 | [[Images]] 38 | Name = "zeekozhu/aspnetcore-node:alpine" 39 | Tag = "zeekozhu/aspnetcore-node" 40 | TestImage = "zeekozhu/aspnetcore-node:tmp-alpine" 41 | Dotnet = "8.0.8" 42 | Node = "v{{NodeVersion}}" 43 | Yarn = "{{YarnVersion}}" 44 | Sdk = false 45 | Suffix = "alpine" 46 | Latest = false 47 | SkipTest = false 48 | 49 | [[Images]] 50 | Name = "zeekozhu/aspnetcore-build-yarn:alpine" 51 | Tag = "zeekozhu/aspnetcore-build-yarn" 52 | TestImage = "zeekozhu/aspnetcore-build-yarn:tmp-alpine" 53 | Dotnet = "8.0.402" 54 | Node = "v{{NodeVersion}}" 55 | Yarn = "{{YarnVersion}}" 56 | Sdk = true 57 | Suffix = "alpine" 58 | Latest = false 59 | SkipTest = false 60 | 61 | [[Images]] 62 | Name = "zeekozhu/aspnetcore-node-deps" 63 | Tag = "zeekozhu/aspnetcore-node-deps" 64 | TestImage = "zeekozhu/aspnetcore-node-deps:tmp" 65 | Dotnet = "8.0.8" 66 | Node = "v{{NodeVersion}}" 67 | Yarn = "{{YarnVersion}}" 68 | Sdk = false 69 | Suffix = "" 70 | Latest = false 71 | SkipTest = true 72 | -------------------------------------------------------------------------------- /daily/8.0/runtime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:8.0.8 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 5 | 6 | RUN apt-get -qq update \ 7 | && apt-get install -y wget curl --no-install-recommends \ 8 | && rm -rf /var/lib/apt/lists/ \ 9 | && apt-get clean 10 | 11 | # install volta 12 | RUN curl https://get.volta.sh | bash 13 | 14 | ENV VOLTA_HOME=/root/.volta 15 | ENV PATH=$VOLTA_HOME/bin:$PATH 16 | 17 | RUN volta install node@latest \ 18 | && volta install yarn@latest \ 19 | && volta list -d --format plain 20 | 21 | WORKDIR / 22 | -------------------------------------------------------------------------------- /daily/8.0/sdk/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:8.0.402 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" 15 | 16 | RUN apt-get -qq update \ 17 | && apt-get install -y build-essential --no-install-recommends \ 18 | && rm -rf /var/lib/apt/lists/* 19 | 20 | # install volta 21 | RUN curl https://get.volta.sh | bash 22 | 23 | ENV VOLTA_HOME=/root/.volta 24 | ENV PATH=$VOLTA_HOME/bin:$PATH 25 | 26 | RUN volta install node@latest \ 27 | && volta install yarn@latest \ 28 | && volta list -d --format plain 29 | 30 | # Trigger first run experience by running arbitrary cmd to populate local package cache 31 | RUN dotnet help \ 32 | && dotnet tool install -g paket 33 | 34 | WORKDIR / 35 | -------------------------------------------------------------------------------- /daily/8.0/sdk/chromium.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/sdk:8.0.402 2 | 3 | # set up environment 4 | ENV ASPNETCORE_URLS http://+:80 \ 5 | # Enable detection of running in a container 6 | DOTNET_RUNNING_IN_CONTAINER=true \ 7 | # Enable correct mode for dotnet watch (only mode supported in a container) 8 | DOTNET_USE_POLLING_FILE_WATCHER=true \ 9 | # Skip extraction of XML docs - generally not useful within an image/container - helps perfomance 10 | NUGET_XMLDOC_MODE=skip 11 | 12 | ENV DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2 \ 13 | FAKE_DETAILED_ERRORS=true \ 14 | PATH="/root/.dotnet/tools:${PATH}" \ 15 | CHROME_BIN=/usr/bin/chromium 16 | 17 | # install volta 18 | RUN curl https://get.volta.sh | bash 19 | 20 | ENV VOLTA_HOME=/root/.volta 21 | ENV PATH=$VOLTA_HOME/bin:$PATH 22 | 23 | RUN volta install node@latest \ 24 | && volta install yarn@latest \ 25 | && volta list -d --format plain 26 | 27 | # Install chromium 28 | RUN apt-get -qq update \ 29 | && apt-get install -y chromium build-essential --no-install-recommends \ 30 | && rm -rf /var/lib/apt/lists/* 31 | 32 | # Trigger first run experience by running arbitrary cmd to populate local package cache 33 | RUN dotnet help \ 34 | && dotnet tool install -g paket 35 | 36 | WORKDIR / 37 | -------------------------------------------------------------------------------- /docker.fs: -------------------------------------------------------------------------------- 1 | module CLI.Docker 2 | 3 | open System 4 | open System.IO 5 | open System.Text.RegularExpressions 6 | open Nett 7 | open Semver 8 | open CLI 9 | 10 | type BuildOptions = 11 | { Tag: string 12 | Dockerfile: FileInfo 13 | ContextPath: DirectoryInfo 14 | Spec: string } 15 | 16 | let build (options: BuildOptions) = 17 | Exec.run 18 | "docker" 19 | [ "build" 20 | "-t" 21 | options.Tag 22 | "-f" 23 | options.Dockerfile.FullName 24 | options.ContextPath.FullName ] 25 | 26 | 27 | 28 | [] 29 | type ImageSpecItem = 30 | { Name: string 31 | TestImage: string 32 | Dotnet: string 33 | Node: string 34 | Yarn: string 35 | Sdk: bool 36 | Suffix: string 37 | Latest: bool 38 | SkipTest: bool 39 | Tag: string } 40 | 41 | [] 42 | type ImageSpec = { Images: ImageSpecItem [] } 43 | 44 | let getBuildParams (specFile: string) (name: string) = 45 | let spec = 46 | Toml.ReadFile(specFile) 47 | 48 | spec.Images |> Seq.find (fun x -> x.Name = name) 49 | 50 | let acceptList = 51 | [ "dotnet", "5.0.100-preview.7.20366.6", "5.0.100-preview.7.20366.15" ] 52 | 53 | let inAcceptList versions = acceptList |> List.contains versions 54 | 55 | let checkVersion (item, itemValue, actualValue: string) = 56 | $"Q: Is %s{item}'s version %s{itemValue} ?" 57 | |> printfn "%s" 58 | 59 | if itemValue.Trim() <> actualValue.Trim() 60 | && not 61 | <| inAcceptList (item, itemValue.Trim(), actualValue.Trim()) then 62 | printfn $"A: No, %s{item}'s version is %s{actualValue}!" 63 | failwithf $"Test %s{item} failed" 64 | else 65 | printfn "A: Yes!" 66 | 67 | let dockerRunRm image args = 68 | Exec.readAsync "docker" ([ "run"; "--rm"; image ] @ args) 69 | 70 | let dotnetVersion (imageSpec: ImageSpecItem) = 71 | async { 72 | if imageSpec.Sdk then 73 | return! dockerRunRm imageSpec.TestImage [ "dotnet"; "--version" ] 74 | else 75 | let reg = 76 | Regex( 77 | "^ Microsoft.AspNetCore.App (?.*) \\[.*\\]$", 78 | RegexOptions.Multiline 79 | ) 80 | 81 | let! result = dockerRunRm imageSpec.TestImage [ "dotnet"; "--info" ] 82 | return (reg.Match(result).Groups.Item "runtime").Value 83 | } 84 | 85 | let testImage (services: IServiceProvider) (imageSpec: ImageSpecItem) = 86 | if imageSpec.SkipTest then 87 | () 88 | else 89 | [| dockerRunRm imageSpec.TestImage [ "node"; "--version" ] 90 | dockerRunRm imageSpec.TestImage [ "yarn"; "--version" ] 91 | dockerRunRm imageSpec.TestImage [ "volta"; "--version" ] |] 92 | |> Async.Parallel 93 | |> Async.RunSynchronously 94 | |> ignore 95 | 96 | let dotnetVersion = 97 | dotnetVersion imageSpec |> Async.RunSynchronously 98 | 99 | [ ("dotnet", dotnetVersion, imageSpec.Dotnet) ] 100 | |> List.iter checkVersion 101 | 102 | let publishImage (services: IServiceProvider) (spec: ImageSpecItem) = 103 | let versionConfig = Versions.readVersions () 104 | let latestVersion = versionConfig.Latest 105 | 106 | let version = 107 | SemVersion.Parse(spec.Dotnet, SemVersionStyles.Any) 108 | 109 | let major = string version.Major 110 | 111 | let minor = 112 | major + "." + string version.Minor 113 | 114 | let patch = version.ToString() 115 | 116 | seq { 117 | yield minor 118 | yield patch 119 | 120 | if spec.Latest && minor = latestVersion then 121 | yield "latest" 122 | } 123 | |> Seq.map (fun t -> 124 | let tag = spec.Tag + ":" + t 125 | 126 | if String.IsNullOrEmpty spec.Suffix then 127 | tag 128 | else 129 | tag + "-" + spec.Suffix) 130 | |> Seq.iter (fun t -> 131 | printfn $"Pushing %s{t}" 132 | Exec.run "docker" [ "tag"; spec.TestImage; t ] 133 | Exec.run "docker" [ "push"; t ]) 134 | 135 | let ciBuild (services: IServiceProvider) (p: BuildOptions) = 136 | let buildParams = 137 | getBuildParams p.Spec p.Tag 138 | 139 | let buildOptions = 140 | { p with Tag = buildParams.TestImage } 141 | 142 | build buildOptions 143 | testImage services buildParams 144 | publishImage services buildParams 145 | -------------------------------------------------------------------------------- /paket.dependencies: -------------------------------------------------------------------------------- 1 | storage: none 2 | framework: net6.0 3 | source https://api.nuget.org/v3/index.json 4 | source https://www.myget.org/F/zeekoget/api/v3/index.json 5 | nuget Fake.DotNet.Cli 6 | nuget Nett 7 | nuget MyFakeTools 8 | nuget TaskBuilder.fs 9 | nuget FSharp.Data 10 | nuget FsToolkit.ErrorHandling 11 | nuget System.CommandLine 2.0.0-beta4.22272.1 beta4 12 | nuget Microsoft.Extensions.Logging.Console 13 | nuget SimpleExec 14 | nuget Semver -------------------------------------------------------------------------------- /paket.lock: -------------------------------------------------------------------------------- 1 | STORAGE: NONE 2 | RESTRICTION: == net6.0 3 | NUGET 4 | remote: https://api.nuget.org/v3/index.json 5 | BlackFox.VsWhere (1.1) 6 | FSharp.Core (>= 4.2.3) 7 | Microsoft.Win32.Registry (>= 4.7) 8 | CommandLineParser.FSharp (2.9.1) 9 | FSharp.Core (>= 4.5.1) 10 | Fake.Core.CommandLineParsing (5.22) 11 | FParsec (>= 1.1.1) 12 | FSharp.Core (>= 6.0) 13 | Fake.Core.Context (5.22) 14 | FSharp.Core (>= 6.0) 15 | Fake.Core.Environment (5.22) 16 | FSharp.Core (>= 6.0) 17 | Fake.Core.FakeVar (5.22) 18 | Fake.Core.Context (>= 5.22) 19 | FSharp.Core (>= 6.0) 20 | Fake.Core.Process (5.22) 21 | Fake.Core.Environment (>= 5.22) 22 | Fake.Core.FakeVar (>= 5.22) 23 | Fake.Core.String (>= 5.22) 24 | Fake.Core.Trace (>= 5.22) 25 | Fake.IO.FileSystem (>= 5.22) 26 | FSharp.Core (>= 6.0) 27 | System.Collections.Immutable (>= 5.0) 28 | Fake.Core.SemVer (5.22) 29 | FSharp.Core (>= 6.0) 30 | Fake.Core.String (5.22) 31 | FSharp.Core (>= 6.0) 32 | Fake.Core.Target (5.22) 33 | Fake.Core.CommandLineParsing (>= 5.22) 34 | Fake.Core.Context (>= 5.22) 35 | Fake.Core.Environment (>= 5.22) 36 | Fake.Core.FakeVar (>= 5.22) 37 | Fake.Core.Process (>= 5.22) 38 | Fake.Core.String (>= 5.22) 39 | Fake.Core.Trace (>= 5.22) 40 | FSharp.Control.Reactive (>= 5.0.2) 41 | FSharp.Core (>= 6.0) 42 | Fake.Core.Tasks (5.22) 43 | Fake.Core.Trace (>= 5.22) 44 | FSharp.Core (>= 6.0) 45 | Fake.Core.Trace (5.22) 46 | Fake.Core.Environment (>= 5.22) 47 | Fake.Core.FakeVar (>= 5.22) 48 | FSharp.Core (>= 6.0) 49 | Fake.Core.Xml (5.22) 50 | Fake.Core.String (>= 5.22) 51 | FSharp.Core (>= 6.0) 52 | Fake.DotNet.Cli (5.22) 53 | Fake.Core.Environment (>= 5.22) 54 | Fake.Core.Process (>= 5.22) 55 | Fake.Core.String (>= 5.22) 56 | Fake.Core.Trace (>= 5.22) 57 | Fake.DotNet.MSBuild (>= 5.22) 58 | Fake.DotNet.NuGet (>= 5.22) 59 | Fake.IO.FileSystem (>= 5.22) 60 | FSharp.Core (>= 6.0) 61 | Mono.Posix.NETStandard (>= 1.0) 62 | Newtonsoft.Json (>= 13.0.1) 63 | Fake.DotNet.MSBuild (5.22) 64 | BlackFox.VsWhere (>= 1.1) 65 | Fake.Core.Environment (>= 5.22) 66 | Fake.Core.Process (>= 5.22) 67 | Fake.Core.String (>= 5.22) 68 | Fake.Core.Trace (>= 5.22) 69 | Fake.IO.FileSystem (>= 5.22) 70 | FSharp.Core (>= 6.0) 71 | MSBuild.StructuredLogger (>= 2.1.545) 72 | Fake.DotNet.NuGet (5.22) 73 | Fake.Core.Environment (>= 5.22) 74 | Fake.Core.Process (>= 5.22) 75 | Fake.Core.SemVer (>= 5.22) 76 | Fake.Core.String (>= 5.22) 77 | Fake.Core.Tasks (>= 5.22) 78 | Fake.Core.Trace (>= 5.22) 79 | Fake.Core.Xml (>= 5.22) 80 | Fake.IO.FileSystem (>= 5.22) 81 | Fake.Net.Http (>= 5.22) 82 | FSharp.Core (>= 6.0) 83 | Newtonsoft.Json (>= 13.0.1) 84 | NuGet.Protocol (>= 5.11) 85 | Fake.IO.FileSystem (5.22) 86 | Fake.Core.String (>= 5.22) 87 | FSharp.Core (>= 6.0) 88 | Fake.Net.Http (5.22) 89 | Fake.Core.Trace (>= 5.22) 90 | FSharp.Core (>= 6.0) 91 | Fake.Tools.Git (5.22) 92 | Fake.Core.Environment (>= 5.22) 93 | Fake.Core.Process (>= 5.22) 94 | Fake.Core.SemVer (>= 5.22) 95 | Fake.Core.String (>= 5.22) 96 | Fake.Core.Trace (>= 5.22) 97 | Fake.IO.FileSystem (>= 5.22) 98 | FSharp.Core (>= 6.0) 99 | FParsec (1.1.1) 100 | FSharp.Core (>= 4.3.4) 101 | FSharp.Control.Reactive (5.0.5) 102 | FSharp.Core (>= 4.7.2) 103 | System.Reactive (>= 5.0 < 6.0) 104 | FSharp.Core (6.0.5) 105 | FSharp.Data (4.2.9) 106 | FSharp.Core (>= 5.0.1) 107 | FsToolkit.ErrorHandling (2.13) 108 | FSharp.Core (>= 4.7.2) 109 | Microsoft.Build (17.2) 110 | Microsoft.Build.Framework (>= 17.2) 111 | Microsoft.NET.StringTools (>= 1.0) 112 | Microsoft.Win32.Registry (>= 4.3) 113 | System.Collections.Immutable (>= 5.0) 114 | System.Configuration.ConfigurationManager (>= 4.7) 115 | System.Reflection.Metadata (>= 1.6) 116 | System.Security.Principal.Windows (>= 4.7) 117 | System.Text.Encoding.CodePages (>= 4.0.1) 118 | System.Text.Json (>= 6.0) 119 | System.Threading.Tasks.Dataflow (>= 6.0) 120 | Microsoft.Build.Framework (17.2) 121 | Microsoft.Win32.Registry (>= 4.3) 122 | System.Security.Permissions (>= 4.7) 123 | Microsoft.Build.Tasks.Core (17.2) 124 | Microsoft.Build.Framework (>= 17.2) 125 | Microsoft.Build.Utilities.Core (>= 17.2) 126 | Microsoft.NET.StringTools (>= 1.0) 127 | Microsoft.Win32.Registry (>= 4.3) 128 | System.CodeDom (>= 4.4) 129 | System.Collections.Immutable (>= 5.0) 130 | System.Reflection.Metadata (>= 1.6) 131 | System.Resources.Extensions (>= 4.6) 132 | System.Security.Cryptography.Pkcs (>= 4.7) 133 | System.Security.Cryptography.Xml (>= 4.7) 134 | System.Security.Permissions (>= 4.7) 135 | System.Threading.Tasks.Dataflow (>= 6.0) 136 | Microsoft.Build.Utilities.Core (17.2) 137 | Microsoft.Build.Framework (>= 17.2) 138 | Microsoft.NET.StringTools (>= 1.0) 139 | Microsoft.Win32.Registry (>= 4.3) 140 | System.Collections.Immutable (>= 5.0) 141 | System.Configuration.ConfigurationManager (>= 4.7) 142 | Microsoft.Extensions.Configuration (6.0.1) 143 | Microsoft.Extensions.Configuration.Abstractions (>= 6.0) 144 | Microsoft.Extensions.Primitives (>= 6.0) 145 | Microsoft.Extensions.Configuration.Abstractions (6.0) 146 | Microsoft.Extensions.Primitives (>= 6.0) 147 | Microsoft.Extensions.Configuration.Binder (6.0) 148 | Microsoft.Extensions.Configuration.Abstractions (>= 6.0) 149 | Microsoft.Extensions.DependencyInjection (6.0) 150 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 151 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 152 | Microsoft.Extensions.DependencyInjection.Abstractions (6.0) 153 | Microsoft.Extensions.Logging (6.0) 154 | Microsoft.Extensions.DependencyInjection (>= 6.0) 155 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 156 | Microsoft.Extensions.Logging.Abstractions (>= 6.0) 157 | Microsoft.Extensions.Options (>= 6.0) 158 | System.Diagnostics.DiagnosticSource (>= 6.0) 159 | Microsoft.Extensions.Logging.Abstractions (6.0.1) 160 | Microsoft.Extensions.Logging.Configuration (6.0) 161 | Microsoft.Extensions.Configuration (>= 6.0) 162 | Microsoft.Extensions.Configuration.Abstractions (>= 6.0) 163 | Microsoft.Extensions.Configuration.Binder (>= 6.0) 164 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 165 | Microsoft.Extensions.Logging (>= 6.0) 166 | Microsoft.Extensions.Logging.Abstractions (>= 6.0) 167 | Microsoft.Extensions.Options (>= 6.0) 168 | Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0) 169 | Microsoft.Extensions.Logging.Console (6.0) 170 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 171 | Microsoft.Extensions.Logging (>= 6.0) 172 | Microsoft.Extensions.Logging.Abstractions (>= 6.0) 173 | Microsoft.Extensions.Logging.Configuration (>= 6.0) 174 | Microsoft.Extensions.Options (>= 6.0) 175 | System.Text.Json (>= 6.0) 176 | Microsoft.Extensions.Options (6.0) 177 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 178 | Microsoft.Extensions.Primitives (>= 6.0) 179 | Microsoft.Extensions.Options.ConfigurationExtensions (6.0) 180 | Microsoft.Extensions.Configuration.Abstractions (>= 6.0) 181 | Microsoft.Extensions.Configuration.Binder (>= 6.0) 182 | Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0) 183 | Microsoft.Extensions.Options (>= 6.0) 184 | Microsoft.Extensions.Primitives (>= 6.0) 185 | Microsoft.Extensions.Primitives (6.0) 186 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 187 | Microsoft.NET.StringTools (1.0) 188 | System.Memory (>= 4.5.4) 189 | System.Runtime.CompilerServices.Unsafe (>= 5.0) 190 | Microsoft.NETCore.Platforms (6.0.4) 191 | Microsoft.Win32.Registry (5.0) 192 | System.Security.AccessControl (>= 5.0) 193 | System.Security.Principal.Windows (>= 5.0) 194 | Microsoft.Win32.SystemEvents (6.0.1) 195 | Mono.Posix.NETStandard (1.0) 196 | MSBuild.StructuredLogger (2.1.669) 197 | Microsoft.Build (>= 16.10) 198 | Microsoft.Build.Framework (>= 16.10) 199 | Microsoft.Build.Tasks.Core (>= 16.10) 200 | Microsoft.Build.Utilities.Core (>= 16.10) 201 | NETStandard.Library (2.0.3) 202 | Microsoft.NETCore.Platforms (>= 1.1) 203 | Nett (0.15) 204 | Newtonsoft.Json (13.0.1) 205 | NuGet.Common (6.2.1) 206 | NuGet.Frameworks (>= 6.2.1) 207 | NuGet.Configuration (6.2.1) 208 | NuGet.Common (>= 6.2.1) 209 | System.Security.Cryptography.ProtectedData (>= 4.4) 210 | NuGet.Frameworks (6.2.1) 211 | NuGet.Packaging (6.2.1) 212 | Newtonsoft.Json (>= 13.0.1) 213 | NuGet.Configuration (>= 6.2.1) 214 | NuGet.Versioning (>= 6.2.1) 215 | System.Security.Cryptography.Cng (>= 5.0) 216 | System.Security.Cryptography.Pkcs (>= 5.0) 217 | NuGet.Protocol (6.2.1) 218 | NuGet.Packaging (>= 6.2.1) 219 | NuGet.Versioning (6.2.1) 220 | Semver (2.2) 221 | SimpleExec (10.0) 222 | System.CodeDom (6.0) 223 | System.Collections.Immutable (6.0) 224 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 225 | System.CommandLine (2.0.0-beta4.22272.1) 226 | System.Configuration.ConfigurationManager (6.0) 227 | System.Security.Cryptography.ProtectedData (>= 6.0) 228 | System.Security.Permissions (>= 6.0) 229 | System.Diagnostics.DiagnosticSource (6.0) 230 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 231 | System.Drawing.Common (6.0) 232 | Microsoft.Win32.SystemEvents (>= 6.0) 233 | System.Formats.Asn1 (6.0) 234 | System.Memory (4.5.5) 235 | System.Reactive (5.0) 236 | System.Reflection.Metadata (6.0.1) 237 | System.Collections.Immutable (>= 6.0) 238 | System.Resources.Extensions (6.0) 239 | System.Runtime.CompilerServices.Unsafe (6.0) 240 | System.Security.AccessControl (6.0) 241 | System.Security.Cryptography.Cng (5.0) 242 | System.Formats.Asn1 (>= 5.0) 243 | System.Security.Cryptography.Pkcs (6.0.1) 244 | System.Formats.Asn1 (>= 6.0) 245 | System.Security.Cryptography.ProtectedData (6.0) 246 | System.Security.Cryptography.Xml (6.0) 247 | System.Security.AccessControl (>= 6.0) 248 | System.Security.Cryptography.Pkcs (>= 6.0) 249 | System.Security.Permissions (6.0) 250 | System.Security.AccessControl (>= 6.0) 251 | System.Windows.Extensions (>= 6.0) 252 | System.Security.Principal.Windows (5.0) 253 | System.Text.Encoding.CodePages (6.0) 254 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 255 | System.Text.Encodings.Web (6.0) 256 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 257 | System.Text.Json (6.0.5) 258 | System.Runtime.CompilerServices.Unsafe (>= 6.0) 259 | System.Text.Encodings.Web (>= 6.0) 260 | System.Threading.Tasks.Dataflow (6.0) 261 | System.ValueTuple (4.5) 262 | System.Windows.Extensions (6.0) 263 | System.Drawing.Common (>= 6.0) 264 | TaskBuilder.fs (2.1) 265 | FSharp.Core (>= 4.1.17) 266 | NETStandard.Library (>= 1.6.1) 267 | System.ValueTuple (>= 4.4) 268 | remote: https://www.myget.org/F/zeekoget/api/v3/index.json 269 | MyFakeTools (0.0.17) 270 | CommandLineParser.FSharp (>= 2.8 < 3.0) 271 | Fake.Core.Target (>= 5.20 < 6.0) 272 | Fake.Tools.Git (>= 5.20 < 6.0) 273 | -------------------------------------------------------------------------------- /paket.references: -------------------------------------------------------------------------------- 1 | System.CommandLine 2 | Nett 3 | Microsoft.Extensions.Logging.Console 4 | FSharp.Core 5 | SimpleExec 6 | Microsoft.Extensions.DependencyInjection 7 | Semver 8 | Fake.IO.FileSystem 9 | Fsharp.Data 10 | FsToolkit.ErrorHandling -------------------------------------------------------------------------------- /sample-release.json: -------------------------------------------------------------------------------- 1 | { 2 | "channel-version": "3.1", 3 | "latest-release": "3.1.2", 4 | "latest-release-date": "2020-03-16", 5 | "latest-runtime": "3.1.2", 6 | "latest-sdk": "3.1.200", 7 | "support-phase": "lts", 8 | "eol-date": "2022-12-03", 9 | "lifecycle-policy": "https://www.microsoft.com/net/support/policy", 10 | "releases": [ 11 | { 12 | "release-date": "2020-03-16", 13 | "release-version": "3.1.2", 14 | "security": false, 15 | "release-notes": "https://github.com/dotnet/core/blob/master/release-notes/3.1/3.1.2/3.1.2.md", 16 | "runtime": { 17 | "version": "3.1.2", 18 | "version-display": "3.1.2", 19 | "files": [ 20 | { 21 | "name": "dotnet-runtime-linux-arm.tar.gz", 22 | "rid": "linux-arm", 23 | "url": "https://download.visualstudio.microsoft.com/download/pr/30ed47bb-c25b-431c-9cfd-7b942b07314f/5c92af345a5475ca58b6878dd974e1dc/dotnet-runtime-3.1.2-linux-arm.tar.gz", 24 | "hash": "2bf9273a959033d070e2f36c1966e8ab4f106b00fbf68628717ae47fb62a5e28c340d8c9361bdbe05fc8213e9a08966b90a3437fec764c08726422f57d5e906f" 25 | } 26 | ] 27 | }, 28 | "sdk": { 29 | "version": "3.1.200", 30 | "version-display": "3.1.200", 31 | "runtime-version": "3.1.2", 32 | "vs-version": "16.5.0", 33 | "vs-support": "Visual Studio 2019 (v16.5)", 34 | "csharp-version": "8.0", 35 | "fsharp-version": "4.7", 36 | "files": [ 37 | { 38 | "name": "dotnet-sdk-linux-arm.tar.gz", 39 | "rid": "linux-arm", 40 | "url": "https://download.visualstudio.microsoft.com/download/pr/21a124fd-5bb7-403f-bdd2-489f9d21d695/b58fa90d19a5a5124d21dea94422868c/dotnet-sdk-3.1.200-linux-arm.tar.gz", 41 | "hash": "5e8a5e5899cd3c635a4278c6c57b9f9c75ffee81734ccf85feaacf1c3799cc135fd24d401abb7e8783db40e2072769a1d2a012f3317ed39cc019d69712243266" 42 | } 43 | ] 44 | }, 45 | "aspnetcore-runtime": { 46 | "version": "3.1.2", 47 | "version-display": "3.1.2", 48 | "version-aspnetcoremodule": [ 49 | "13.1.20018.2" 50 | ], 51 | "vs-version": "", 52 | "files": [ 53 | { 54 | "name": "aspnetcore-runtime-linux-arm.tar.gz", 55 | "rid": "linux-arm", 56 | "url": "https://download.visualstudio.microsoft.com/download/pr/8ccacf09-e5eb-481b-a407-2398b08ac6ac/1cef921566cb9d1ca8c742c9c26a521c/aspnetcore-runtime-3.1.2-linux-arm.tar.gz", 57 | "hash": "e2a9d4c53e7dcdf6ab1f3b782c57d162297401cff20b7784bd019eeed360ed2d3635eea869bb42e2fc5965cf0c8d4d1517d0988e475a5689685af77b63ff64c0" 58 | }, 59 | { 60 | "name": "dotnet-hosting-win.exe", 61 | "rid": "", 62 | "url": "https://download.visualstudio.microsoft.com/download/pr/dd119832-dc46-4ccf-bc12-69e7bfa61b18/990843c6e0cbd97f9df68c94f6de6bb6/dotnet-hosting-3.1.2-win.exe", 63 | "hash": "913470ccc4a9c0ac4ef05c47d717e757a7fe594fcb2cc71cc852e478fb66b51840bdae23433ac149601cfea6ec8f4468e2bda1eb92ca0e3849f33c301cd561d7" 64 | } 65 | ] 66 | } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /sample.Dockerfile: -------------------------------------------------------------------------------- 1 | # Sample contents of Dockerfile 2 | # Stage 1 3 | FROM zeekozhu/aspnetcore-build-yarn:2.1-alpine AS builder 4 | WORKDIR /source 5 | 6 | # caches restore result by copying csproj file separately 7 | COPY *.csproj . 8 | COPY ./ClientApp/*.json ./ClientApp/ 9 | COPY ./ClientApp/yarn.lock ./ClientApp/ 10 | 11 | RUN dotnet restore && cd ClientApp && yarn 12 | 13 | # copies the rest of your code 14 | COPY . . 15 | RUN dotnet publish --output /app/ --configuration Release 16 | 17 | # Stage 2 18 | FROM zeekozhu/aspnetcore-node:2.1-alpine 19 | WORKDIR /app 20 | COPY --from=builder /app . 21 | ENTRYPOINT ["dotnet", "myapp.dll"] 22 | -------------------------------------------------------------------------------- /versions.toml: -------------------------------------------------------------------------------- 1 | TrackingVersions = ['6.0', '7.0', '8.0'] 2 | Latest = '7.0' 3 | --------------------------------------------------------------------------------