-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…t frameworks (#2230) * Update Docker * Upgrade all packages and Microsoft artifacts: 1. to the most recent versions available 2. ideally to version 9.0.* * Fix compilation errors * Fix warnings except NU1902: CS0618: 'DiscoveryApplicationBuilderExtensions.UseDiscoveryClient(IApplicationBuilder)' is obsolete: 'This method call is no longer needed, you should remove it.' MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\rmaks\.nuget\packages\microsoft.servicefabric.data\7.1.2493\lib\netstandard2.0\Microsoft.ServiceFabric.Data.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. SYSLIB0057: 'X509Certificate2.X509Certificate2(string, string?, X509KeyStorageFlags)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' Ignore NU1902: Package 'IdentityServer4' 4.1.2 has a known moderate severity vulnerability * Fix IDE messages * Fix integration tests: The 'Should_be_able_to_use_token_from_ocelot_a_on_ocelot_b' test related to IdentityServer4 requires migration to .NET 9 or removing * Build using the Docker image version 9.24.0 (Linux OS, double SDKs) * Add `BddfyConfig` class to override the default BDDfy report behavior in `Steps` * Disable BatchProcessors * IDE0130: Namespace "Ocelot.AcceptanceTests" does not match folder structure, expected "Ocelot.AcceptanceTests.Properties" Where -> \test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L4 * Raynald is refactoring super star! Warning: Unexpected character sequence in array element value. Where: samples\Administration\Issue645.postman_collection.json L135+145 * CA1816: A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic). Where: test\Ocelot.AcceptanceTests\HeaderTests.cs L460 * CA1859: Using concrete types avoids virtual or interface call overhead and enables inlining. Change type of variable 'client' from 'Ocelot.WebSockets.IClientWebSocket' to 'Ocelot.WebSockets.ClientWebSocketProxy' for improved performance Where: test\Ocelot.AcceptanceTests\WebSocketTests.cs L128+180 * CA2211: Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object. Where: src\Ocelot.Administration\IdentityServerMiddlewareConfigurationProvider.cs L10 * IDE0044: Make field readonly Where: test\Ocelot.AcceptanceTests\Properties\BddfyConfig.cs L21 * IDE0039 Use local function * IDE0059 Avoid unnecessary value assignments in your code, as these likely indicate redundant value computations. If the value computation is not redundant and you intend to retain the assignment, then change the assignment target to a local variable whose name starts with an underscore and is optionally followed by an integer, such as '_', '_1', '_2', etc. These are treated as special discard symbol names. * IDE1006 Naming rule violation: These words must begin with upper case characters * IDE0079 Remove unnecessary suppression * IDE0330 Use 'System.Threading.Lock' * IDE1006 Naming rule violation: These words must begin with upper case characters: Fix compilation error * Ignore xUnit1004: Test methods should not be skipped
- Loading branch information
Showing
60 changed files
with
479 additions
and
390 deletions.
There are no files selected for viewing
This file contains 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 characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:9.0-nanoserver-ltsc2022 | ||
|
||
# Install PowerShell globally AND RUN powershell -Command "gci" | ||
#RUN dotnet tool install -g powershell && pwsh -Command "gci" | ||
RUN pwsh -Command "gci" | ||
|
||
# # Install .NET 8 SDK | ||
USER ContainerAdministrator | ||
RUN pwsh -Command "Invoke-WebRequest -OutFile dotnet-install.ps1 https://dot.net/v1/dotnet-install.ps1; gci" | ||
ENV DOTNET_GENERATE_ASPNET_CERTIFICATE=true | ||
RUN pwsh -Command "./dotnet-install.ps1 -Channel 8.0 -InstallDir 'C:\Program Files\dotnet\'; gci -Path C:\\ -Recurse -Include *8.0* -Directory" | ||
|
||
#RUN git status | ||
RUN dotnet --info | ||
|
||
# Generate and export the development SSL certificate | ||
#RUN mkdir -p certs | ||
#RUN dotnet dev-certs https -ep certs/cert.pem -p '' | ||
#RUN pwsh -Command "dotnet dev-certs https --clean; dotnet dev-certs https; exit 0;" | ||
#RUN pwsh -Command "dotnet dev-certs https --trust; exit 0;" | ||
RUN pwsh -Command "dotnet dev-certs https --check --trust; exit 0;" | ||
|
||
#ENV ASPNETCORE_URLS="https://+;http://+" ASPNETCORE_HTTPS_PORT=443 | ||
#ENV ASPNETCORE_Kestrel__Certificates__Default__Password="" ASPNETCORE_Kestrel__Certificates__Default__Path=certs/cert.pem |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
# docker build | ||
|
||
This folder contains the `Dockerfile.*` and `build.sh` script to create the Ocelot build image & container. | ||
This folder contains the `Dockerfile.*` and `build-*.sh` scripts to create the Ocelot build image & container. | ||
|
||
## Account | ||
- [Ocelot Gateway Profile | Docker Hub](https://hub.docker.com/u/ocelot2) | ||
- Docker Hub | [Ocelot Gateway](https://hub.docker.com/u/ocelot2) | ||
|
||
## Repositories | ||
- [circleci-build](https://hub.docker.com/r/ocelot2/circleci-build) | ||
|
||
## ocelot2/circleci-build Tags | ||
- [latest](https://hub.docker.com/layers/ocelot2/circleci-build/latest/images/sha256-981d6f9e6e5ba54f6e044bca6fcf8b5197a8f3e6ce2b3cdfa9e6704ecd2ca969?context=explore) is version 8.23.2, uploaded on Apr 3, 2024. | ||
- [8.23.2](https://hub.docker.com/layers/ocelot2/circleci-build/8.23.2/images/sha256-981d6f9e6e5ba54f6e044bca6fcf8b5197a8f3e6ce2b3cdfa9e6704ecd2ca969?context=explore), uploaded on Apr 3, 2024. It supports development SSL certificates by the command `dotnet dev-certs https`. | ||
## Outdated Tags | ||
- [8.21.0](https://hub.docker.com/layers/ocelot2/circleci-build/8.21.0/images/sha256-edb46d37ab52d39a5b27dc63895e5944d4d491d1788744ed144ecb4303b94532?context=explore), uploaded on Nov 20, 2023. It contains .NET 8, 7 and 6 SDKs. It supports builds for `net6.0`, `net7.0` and `net8.0` frameworks. | ||
- [8.23.2](https://hub.docker.com/layers/ocelot2/circleci-build/8.23.2/images/sha256-981d6f9e6e5ba54f6e044bca6fcf8b5197a8f3e6ce2b3cdfa9e6704ecd2ca969?context=explore), uploaded on Apr 3, 2024. It supports development SSL certificates by the command `dotnet dev-certs https`. | ||
- [latest](https://hub.docker.com/layers/ocelot2/circleci-build/latest/images/sha256-981d6f9e6e5ba54f6e044bca6fcf8b5197a8f3e6ce2b3cdfa9e6704ecd2ca969?context=explore) is version 8.23.2, uploaded on Apr 3, 2024. | ||
|
||
## .NET 8-9 Tags | ||
|
||
### Single SDK Tags | ||
- [sdk-8-alpine-lin.net8](https://hub.docker.com/layers/ocelot2/circleci-build/sdk-8-alpine-lin.net8/images/sha256-17c21438771641ba2a3320a6c13fe756a851d707a925188d9616485bfc757b22?context=explore), uploaded on Dec 3, 2024. This Linux OS image contains .NET 8 SDK only. It supports builds for `net8.0` framework. | ||
- [sdk-9-alpine-lin.net9](https://hub.docker.com/layers/ocelot2/circleci-build/sdk-9-alpine-lin.net9/images/sha256-c20d82a52c1a7eebf86bcd32751960ae189e6c50575959ee0499b1d88541c9ea?context=explore), uploaded on Dec 3, 2024. This Linux OS image contains .NET 9 SDK only. It supports builds for `net9.0` framework. | ||
- [sdk8-nanoserver2022-win.net8](https://hub.docker.com/layers/ocelot2/circleci-build/sdk8-nanoserver2022-win.net8/images/sha256-20f21f4361d18301bc885e1f01ebefcd6b024802130db1296173cdfaac5d75e6?context=explore), uploaded on Dec 3, 2024. This Windows OS image contains .NET 8 SDK only. It supports builds for `net8.0` framework. | ||
- [sdk9-nano2022-win.net9](https://hub.docker.com/layers/ocelot2/circleci-build/sdk9-nano2022-win.net9/images/sha256-37b718885f8cfb3480299f48044836f01aec2370e331667dd1811a4c94a4ce45?context=explore), uploaded on Dec 3, 2024. This Windows OS image contains .NET 9 SDK only. It supports builds for `net9.0` framework. | ||
|
||
### Double SDKs Tags | ||
- [sdk9-alpine-lin.net8-9](https://hub.docker.com/layers/ocelot2/circleci-build/sdk9-alpine-lin.net8-9/images/sha256-707924d144248178caff80578649f7d0e9b7c70ed51b6fb5171170c9a30a4eae?context=explore) aka [9.24.0](https://hub.docker.com/layers/ocelot2/circleci-build/9.24.0/images/sha256-707924d144248178caff80578649f7d0e9b7c70ed51b6fb5171170c9a30a4eae?context=explore), uploaded on Dec 3, 2023. This Linux OS image contains .NET 8 and 9 SDKs. It supports builds for `net8.0` and `net9.0` frameworks. | ||
- [sdk9-nano2022-win.net8-9](https://hub.docker.com/layers/ocelot2/circleci-build/sdk9-nano2022-win.net8-9/images/sha256-6e44a8fc52ab091ea43090b6ab182f7a05d7ac31402ce742a7e035323e584cf7?context=explore) aka [9.24.win](https://hub.docker.com/layers/ocelot2/circleci-build/9.24.win/images/sha256-6e44a8fc52ab091ea43090b6ab182f7a05d7ac31402ce742a7e035323e584cf7?context=explore), uploaded on Dec 4, 2023. This Windows OS image contains .NET 8 and 9 SDKs. It supports builds for `net8.0` and `net9.0` frameworks. | ||
|
||
### Links | ||
- Docker Hub | [Microsoft dotnet Images](https://hub.docker.com/r/microsoft/dotnet) | ||
- GitHub | dotnet-docker | [.NET SDK](https://github.com/dotnet/dotnet-docker/blob/main/README.sdk.md) | ||
- StackOverflow | [PowerShell and process exit codes](https://stackoverflow.com/questions/57468522/powershell-and-process-exit-codes) |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version=9.24.win | ||
tag=sdk9-nano2022-win.net8-9 | ||
|
||
docker build --no-cache --platform windows/amd64 -t ocelot2/circleci-build -f Dockerfile.windows . | ||
|
||
docker tag ocelot2/circleci-build ocelot2/circleci-build:$tag | ||
docker push ocelot2/circleci-build:$tag | ||
|
||
docker tag ocelot2/circleci-build ocelot2/circleci-build:$version | ||
docker push ocelot2/circleci-build:$version |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# This script builds the Ocelot Docker file | ||
# echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin | ||
|
||
# {DotNetSdkVer}.{OcelotVer} -> {.NET8}.{23.2} -> 8.23.2 | ||
version=8.23.2 | ||
docker build --platform linux/amd64 -t ocelot2/circleci-build -f Dockerfile.base . | ||
|
||
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin | ||
# {DotNetSdkVer}.{OcelotVer} -> {.NET9}.{24.0} -> 9.24.0 | ||
#version=9.24.0 | ||
tag=sdk9-alpine-lin.net8-9 | ||
|
||
docker tag ocelot2/circleci-build ocelot2/circleci-build:$version | ||
docker push ocelot2/circleci-build:latest | ||
docker push ocelot2/circleci-build:$version | ||
docker build --platform linux/amd64 -t ocelot2/circleci-build -f Dockerfile.base . | ||
docker tag ocelot2/circleci-build ocelot2/circleci-build:$tag | ||
docker push ocelot2/circleci-build:$tag | ||
# docker tag ocelot2/circleci-build ocelot2/circleci-build:$version | ||
# docker push ocelot2/circleci-build:$version |
File renamed without changes.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine | ||
|
||
RUN apk add bash icu-libs krb5-libs libgcc libintl libssl3 libstdc++ zlib git openssh-client | ||
|
||
RUN curl -L --output ./dotnet-install.sh https://dot.net/v1/dotnet-install.sh | ||
|
||
RUN chmod u+x ./dotnet-install.sh | ||
|
||
# Install .NET 8 SDK (already included in the base image, but listed for consistency) | ||
RUN ./dotnet-install.sh -c 8.0 -i /usr/share/dotnet | ||
|
||
# Install .NET 7 SDK | ||
RUN ./dotnet-install.sh -c 7.0 -i /usr/share/dotnet | ||
|
||
# Install .NET 6 SDK | ||
RUN ./dotnet-install.sh -c 6.0 -i /usr/share/dotnet | ||
|
||
# Generate and export the development certificate | ||
RUN dotnet dev-certs https -ep /certs/cert.pem -p '' && \ | ||
chmod 644 /certs/cert.pem | ||
|
||
ENV ASPNETCORE_URLS="https://+;http://+" | ||
ENV ASPNETCORE_HTTPS_PORT=443 | ||
ENV ASPNETCORE_Kestrel__Certificates__Default__Password="" | ||
ENV ASPNETCORE_Kestrel__Certificates__Default__Path=/certs/cert.pem |
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
5 changes: 1 addition & 4 deletions
5
samples/Eureka/ApiGateway/Ocelot.Samples.Eureka.ApiGateway.csproj
This file contains 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 characters
6 changes: 3 additions & 3 deletions
6
samples/Eureka/DownstreamService/Ocelot.Samples.Eureka.DownstreamService.csproj
This file contains 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 characters
This file contains 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 characters
This file contains 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 characters
Oops, something went wrong.