diff --git a/.github/workflows/build-and-package-release.yml b/.github/workflows/build-and-package-release.yml index ec8a6ad41..c75129ab7 100644 --- a/.github/workflows/build-and-package-release.yml +++ b/.github/workflows/build-and-package-release.yml @@ -38,7 +38,12 @@ jobs: Write-Output "::set-output name=version::$version" - - name: Install .NET core + - name: Install .NET core 6.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + + - name: Install .NET core 3.1 uses: actions/setup-dotnet@v1 with: dotnet-version: '3.1.100' diff --git a/.github/workflows/build-and-publish-docker-images.yml b/.github/workflows/build-and-publish-docker-images.yml index d7f49a444..741c8f937 100644 --- a/.github/workflows/build-and-publish-docker-images.yml +++ b/.github/workflows/build-and-publish-docker-images.yml @@ -5,6 +5,7 @@ on: branches: - main - master + - masterV3 - '*/Fix-*-docker*' release: diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 480649aff..b09738b57 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -4,11 +4,13 @@ on: pull_request: branches: - master + - masterV3 types: [opened, synchronize, reopened, edited] push: branches: - master + - masterV3 jobs: Check-release: @@ -36,7 +38,12 @@ jobs: Write-Output "::set-output name=timestamp::$timestamp" - - name: Install .NET core + - name: Install .NET core 6.0 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.x' + + - name: Install .NET core 3.0 uses: actions/setup-dotnet@v1 with: dotnet-version: '3.1.100' diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml index 49ad03e58..cee1b3984 100644 --- a/.github/workflows/check-style.yml +++ b/.github/workflows/check-style.yml @@ -4,11 +4,13 @@ on: pull_request: branches: - master + - masterV3 types: [opened, synchronize, reopened, edited] push: branches: - master + - masterV3 jobs: Check-style: diff --git a/src/AasxServerStandardBib/AasEntityBuilder.cs b/src/AasxServerStandardBib/AasEntityBuilder.cs index cb6a57c2d..27857823b 100644 --- a/src/AasxServerStandardBib/AasEntityBuilder.cs +++ b/src/AasxServerStandardBib/AasEntityBuilder.cs @@ -235,7 +235,7 @@ public void CreateAddInstanceObjects(AasCore.Aas3_0_RC02.Environment env) targetNodeRec.uanode.NodeId)) { lax.uanode.AddReference(this.AasTypes.HasAasReference.GetTypeNodeId(), false, - targetNodeRec.uanode.NodeId); + targetNodeRec.uanode.NodeId); } } @@ -260,7 +260,7 @@ public void CreateAddInstanceObjects(AasCore.Aas3_0_RC02.Environment env) targetNodeRec.uanode.NodeId)) { lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false, - targetNodeRec.uanode.NodeId); + targetNodeRec.uanode.NodeId); } foundAtAll = true; } @@ -284,7 +284,7 @@ public void CreateAddInstanceObjects(AasCore.Aas3_0_RC02.Environment env) nr.uanode?.NodeId)) { lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false, - nr.uanode?.NodeId); + nr.uanode?.NodeId); } } else @@ -305,7 +305,7 @@ public void CreateAddInstanceObjects(AasCore.Aas3_0_RC02.Environment env) miss?.NodeId)) { lax.uanode.AddReference(this.AasTypes.HasDictionaryEntry.GetTypeNodeId(), false, - miss?.NodeId); + miss?.NodeId); } // put it into the NodeRecords, that it can be re-used?? no!! @@ -584,7 +584,7 @@ public PropertyState CreateAddPropertyState( { if (!parent.ReferenceExists(referenceTypeFromParentId, false, x.NodeId)) { - parent.AddReference(referenceTypeFromParentId, false, x.NodeId); + parent.AddReference(referenceTypeFromParentId, false, x.NodeId); } if (referenceTypeFromParentId == ReferenceTypeIds.HasComponent) x.AddReference(referenceTypeFromParentId, true, parent.NodeId); diff --git a/src/AasxServerStandardBib/AasxHttpContextHelper.cs b/src/AasxServerStandardBib/AasxHttpContextHelper.cs index be721a9e6..c8933b603 100644 --- a/src/AasxServerStandardBib/AasxHttpContextHelper.cs +++ b/src/AasxServerStandardBib/AasxHttpContextHelper.cs @@ -727,12 +727,12 @@ protected static void SendJsonResponse(Grapevine.Interfaces.Server.IHttpContext } //TODO:jtikekar remove - if(context.Request.RawUrl.Equals("/aas/0/core") && obj is ExpandoObject findAasReturn) + if (context.Request.RawUrl.Equals("/aas/0/core") && obj is ExpandoObject findAasReturn) { var value = new JsonObject(); foreach (KeyValuePair kvp in findAasReturn) { - if(kvp.Key.Equals("AAS")) + if (kvp.Key.Equals("AAS")) { value["AAS"] = Jsonization.Serialize.ToJsonObject((AssetAdministrationShell)kvp.Value); } @@ -3427,8 +3427,8 @@ public static bool checkAccessLevelWithError(out string error, string currentRol int iRole = 0; while (securityRole != null && iRole < securityRole.Count && securityRole[iRole].name != null) { - if (aasOrSubmodel == "aas" && securityRole[iRole].objType == "aas") - /* (aasOrSubmodel == "submodel" && securityRole[iRole].objType == "sm")) */ + if (aasOrSubmodel == "aas" && securityRole[iRole].objType == "aas") + /* (aasOrSubmodel == "submodel" && securityRole[iRole].objType == "sm")) */ { if (objectAasOrSubmodel != null && securityRole[iRole].objReference == objectAasOrSubmodel && securityRole[iRole].permission == neededRights) @@ -3626,7 +3626,7 @@ public static bool checkUsage(out string error, securityRoleClass sr) } if (actualTime.Value == null || actualTime.Value == "") { - actualTime.Value = DateTime.UtcNow.ToString(); + actualTime.Value = DateTime.UtcNow.ToString(); actualCount.Value = null; } if (actualCount.Value == null || actualCount.Value == "") @@ -3675,7 +3675,7 @@ public bool checkAccessRights(IHttpContext context, string currentRole, string o { if (checkAccessLevel(currentRole, operation, neededRights, objPath, aasOrSubmodel, objectAasOrSubmodel)) - return true; + return true; if (currentRole == null) { diff --git a/src/AasxServerStandardBib/AasxRestServer.cs b/src/AasxServerStandardBib/AasxRestServer.cs index d8805667f..264d28fe8 100644 --- a/src/AasxServerStandardBib/AasxRestServer.cs +++ b/src/AasxServerStandardBib/AasxRestServer.cs @@ -99,7 +99,7 @@ public static void initListOfRepositories() } // query - [RestRoute(HttpMethod = HttpMethod.GET, PathInfo = "^/queryregistry/([^/]+)(/|)$")] + [RestRoute(HttpMethod = HttpMethod.GET, PathInfo = "^/queryregistry/([^/]+)(/|)$")] [RestRoute(HttpMethod = HttpMethod.POST, PathInfo = "^/queryregistry/(/|)$")] public IHttpContext Queryregistry(IHttpContext context) { @@ -260,7 +260,7 @@ private static bool comp(string op, string left, string right) { string legal = "012345679."; - foreach (var c in left+right) + foreach (var c in left + right) { if (Char.IsDigit(c)) continue; @@ -309,7 +309,7 @@ private static bool comp(string op, string left, string right) int l = Convert.ToInt32(left); int r = Convert.ToInt32(right); - switch(op) + switch (op) { case "==num": return l == r; diff --git a/src/AasxServerStandardBib/AdminShellPackageEnv.cs b/src/AasxServerStandardBib/AdminShellPackageEnv.cs index 8a540a486..815a3348d 100644 --- a/src/AasxServerStandardBib/AdminShellPackageEnv.cs +++ b/src/AasxServerStandardBib/AdminShellPackageEnv.cs @@ -1161,7 +1161,7 @@ public async Task ReplaceSupplementaryFileInPackageAsync(string sourceUri, strin { _openPackage.DeletePart(new Uri(sourceUri, UriKind.RelativeOrAbsolute)); - } + } var targetUri = PackUriHelper.CreatePartUri(new Uri(targetFile, UriKind.RelativeOrAbsolute)); PackagePart packagePart = _openPackage.CreatePart(targetUri, targetContentType); fileContent.Position = 0; diff --git a/src/AasxServerStandardBib/Exceptions/NotImplementedException.cs b/src/AasxServerStandardBib/Exceptions/NotImplementedException.cs index f1a0366f2..bd74b710c 100644 --- a/src/AasxServerStandardBib/Exceptions/NotImplementedException.cs +++ b/src/AasxServerStandardBib/Exceptions/NotImplementedException.cs @@ -6,7 +6,7 @@ namespace AasxServerStandardBib.Exceptions { - internal class NotImplementedException :Exception + internal class NotImplementedException : Exception { public NotImplementedException(string message) : base(message) { diff --git a/src/AasxServerStandardBib/Extenstions/ExtendEnvironment.cs b/src/AasxServerStandardBib/Extenstions/ExtendEnvironment.cs index 08cebf85f..a9e9f853d 100644 --- a/src/AasxServerStandardBib/Extenstions/ExtendEnvironment.cs +++ b/src/AasxServerStandardBib/Extenstions/ExtendEnvironment.cs @@ -391,7 +391,7 @@ public static AssetAdministrationShell FindAasById(this AasCore.Aas3_0_RC02.Envi } var aasList = environment.AssetAdministrationShells.Where(a => a.Id.Equals(aasId)); - if(aasList.Any()) + if (aasList.Any()) { return aasList.First(); } @@ -411,9 +411,9 @@ public static ConceptDescription FindConceptDescriptionById(this AasCore.Aas3_0_ } var conceptDescriptionList = environment.ConceptDescriptions.Where(c => c.Id.Equals(conceptDescriptionId)); - if(conceptDescriptionList.Any()) + if (conceptDescriptionList.Any()) { - return conceptDescriptionList.First(); + return conceptDescriptionList.First(); } return null; diff --git a/src/AasxServerStandardBib/SecurityClient.cs b/src/AasxServerStandardBib/SecurityClient.cs index 510346bbf..f64614f04 100644 --- a/src/AasxServerStandardBib/SecurityClient.cs +++ b/src/AasxServerStandardBib/SecurityClient.cs @@ -1298,7 +1298,7 @@ public static void createCfpTree(int envIndex, DateTime timeStamp) { assetCfp.Add(assetId, cfp); - } + } if (i == envIndex) root = cfp; } diff --git a/src/AasxServerWindows/AasxServerWindows.csproj b/src/AasxServerWindows/AasxServerWindows.csproj index 7faa9318e..ff4ad1399 100644 --- a/src/AasxServerWindows/AasxServerWindows.csproj +++ b/src/AasxServerWindows/AasxServerWindows.csproj @@ -1,6 +1,6 @@  - net472 + net6.0-windows Exe false true diff --git a/src/IO.Swagger.Registry.Lib/Controllers/RegistryAndDiscoveryInterfaceApi.cs b/src/IO.Swagger.Registry.Lib/Controllers/RegistryAndDiscoveryInterfaceApi.cs index b6850ad1b..2972881c5 100644 --- a/src/IO.Swagger.Registry.Lib/Controllers/RegistryAndDiscoveryInterfaceApi.cs +++ b/src/IO.Swagger.Registry.Lib/Controllers/RegistryAndDiscoveryInterfaceApi.cs @@ -865,7 +865,7 @@ public static void initRegistry(DateTime timestamp, bool initAgain = false) if (!initAgain && init) return; - AasxServer.Program.initializingRegistry= true; + AasxServer.Program.initializingRegistry = true; init = true; if (initAgain) diff --git a/src/IO.Swagger.V1RC03/APIModels/Core/OutputModifierContext.cs b/src/IO.Swagger.V1RC03/APIModels/Core/OutputModifierContext.cs index dd989bf5d..8731a6593 100644 --- a/src/IO.Swagger.V1RC03/APIModels/Core/OutputModifierContext.cs +++ b/src/IO.Swagger.V1RC03/APIModels/Core/OutputModifierContext.cs @@ -13,7 +13,7 @@ public class OutputModifierContext private bool _includeChildren = true; private List idShortPaths; public Submodel submodel = null; - public AssetAdministrationShellEnvironmentService aasEnvService= null; + public AssetAdministrationShellEnvironmentService aasEnvService = null; public string Level { get => _level; diff --git a/src/IO.Swagger.V1RC03/Controllers/AASQueryAPI.cs b/src/IO.Swagger.V1RC03/Controllers/AASQueryAPI.cs index 97b73b95a..723263cf4 100644 --- a/src/IO.Swagger.V1RC03/Controllers/AASQueryAPI.cs +++ b/src/IO.Swagger.V1RC03/Controllers/AASQueryAPI.cs @@ -165,7 +165,7 @@ public virtual IActionResult GetQueryRegistryOnly([FromRoute][Required] string s // return new ObjectResult(result); } - + [ApiExplorerSettings(IgnoreApi = true)] [HttpPost] [Route("/queryregistry")] diff --git a/src/IO.Swagger.V1RC03/Controllers/AssetAdministrationShellEnvironmentAPIApi.cs b/src/IO.Swagger.V1RC03/Controllers/AssetAdministrationShellEnvironmentAPIApi.cs index 46836612b..26ec8f4ca 100644 --- a/src/IO.Swagger.V1RC03/Controllers/AssetAdministrationShellEnvironmentAPIApi.cs +++ b/src/IO.Swagger.V1RC03/Controllers/AssetAdministrationShellEnvironmentAPIApi.cs @@ -429,7 +429,7 @@ public virtual IActionResult GetAllSubmodels([FromQuery] string semanticId, [Fro public virtual IActionResult GetAssetAdministrationShellById([FromRoute][Required] string aasIdentifier) { _aasEnvService.SecurityCheckInit(HttpContext, "/shells", "GET"); - + var decodedAasId = _decoderService.Decode("aasIdentifier", aasIdentifier); var output = _aasEnvService.GetAssetAdministrationShellById(decodedAasId, out _); @@ -638,7 +638,7 @@ public virtual IActionResult GetOperationAsyncResultSubmodelRepo([FromRoute][Req [SwaggerOperation("GetSubmodel")] [SwaggerResponse(statusCode: 200, type: typeof(Submodel), description: "Requested Submodel")] [SwaggerResponse(statusCode: 0, type: typeof(Result), description: "Default error handling for unmentioned status codes")] - public virtual IActionResult GetSubmodel([FromRoute][Required] string aasIdentifier,[FromRoute][Required] string submodelIdentifier, + public virtual IActionResult GetSubmodel([FromRoute][Required] string aasIdentifier, [FromRoute][Required] string submodelIdentifier, [FromQuery] LevelEnum level, [FromQuery] ContentEnum content, [FromQuery] ExtentEnum extent) { _aasEnvService.SecurityCheckInit(HttpContext, "/submodels", "GET"); diff --git a/src/IO.Swagger.V1RC03/Controllers/IAASQueryAPIController.cs b/src/IO.Swagger.V1RC03/Controllers/IAASQueryAPIController.cs index 9f6c9c8bc..452243924 100644 --- a/src/IO.Swagger.V1RC03/Controllers/IAASQueryAPIController.cs +++ b/src/IO.Swagger.V1RC03/Controllers/IAASQueryAPIController.cs @@ -7,7 +7,7 @@ namespace IO.Swagger.V1RC03.Controllers public interface IAASQueryAPIController { IActionResult GetQuery([FromRoute, Required] string searchQuery); - IActionResult GetQueryRegistryOnly([FromRoute, Required] string searchQuery); + IActionResult GetQueryRegistryOnly([FromRoute, Required] string searchQuery); IActionResult GetQueryRegistry([FromRoute, Required] string searchQuery); // IActionResult PostQuery([FromBody, Required] string searchQuery); Task PostQueryAsync(); diff --git a/src/IO.Swagger.V1RC03/Services/AasxFileServerInterfaceService.cs b/src/IO.Swagger.V1RC03/Services/AasxFileServerInterfaceService.cs index e947015b3..f87551992 100644 --- a/src/IO.Swagger.V1RC03/Services/AasxFileServerInterfaceService.cs +++ b/src/IO.Swagger.V1RC03/Services/AasxFileServerInterfaceService.cs @@ -79,11 +79,11 @@ public string GetAASXByPackageId(string packageId, out byte[] content, out long System.IO.File.Delete(copyFileName); return fileName; } - else if(requestedPackage != null && string.IsNullOrEmpty(requestedFileName)) + else if (requestedPackage != null && string.IsNullOrEmpty(requestedFileName)) { //File does not exist, may be AAS is added by REST-API //Check if AAS exists - if(requestedPackage.AasEnv.AssetAdministrationShells.Count != 0) + if (requestedPackage.AasEnv.AssetAdministrationShells.Count != 0) { string newFileName = Path.Combine(AasxHttpContextHelper.DataPath, requestedPackage.AasEnv.AssetAdministrationShells[0].IdShort + ".aasx"); using (new FileStream(newFileName, FileMode.CreateNew)) { } diff --git a/src/IO.Swagger.V1RC03/Services/AssetAdministrationShellEnvironmentService.cs b/src/IO.Swagger.V1RC03/Services/AssetAdministrationShellEnvironmentService.cs index 9471ba8f7..0ba5a167d 100644 --- a/src/IO.Swagger.V1RC03/Services/AssetAdministrationShellEnvironmentService.cs +++ b/src/IO.Swagger.V1RC03/Services/AssetAdministrationShellEnvironmentService.cs @@ -68,12 +68,12 @@ public void SecurityCheck(string objPath = "", string aasOrSubmodel = null, obje checkAccessRights(_securityContext.accessRights, _securityContext.route, _securityContext.neededRights, objPath, aasOrSubmodel, objectAasOrSubmodel); - } + } public bool SecurityCheckTestOnly(string objPath = "", string aasOrSubmodel = null, object objectAasOrSubmodel = null) { if (!AasxRestServerLibrary.AasxHttpContextHelper.withAuthentification) - return(true); + return (true); return checkAccessRights(_securityContext.accessRights, _securityContext.route, _securityContext.neededRights, objPath, aasOrSubmodel, objectAasOrSubmodel, true); @@ -90,7 +90,7 @@ public static bool checkAccessRightsWithAllow(string currentRole, string operati string objPath = "", string aasOrSubmodel = null, object objectAasOrSubmodel = null, bool testOnly = false) { string error = "Access not allowed"; - withAllow= false; + withAllow = false; if (Program.secretStringAPI != null) { @@ -104,7 +104,7 @@ public static bool checkAccessRightsWithAllow(string currentRole, string operati if (AasxRestServerLibrary.AasxHttpContextHelper.checkAccessLevelWithError( out error, currentRole, operation, neededRights, out withAllow, objPath, aasOrSubmodel, objectAasOrSubmodel)) - return true; + return true; if (currentRole == null) { @@ -1005,10 +1005,10 @@ public Submodel CreateSubmodel(Submodel body, string aasIdentifier = null) } //Check if corresponding AAS exist. If yes, then add to the same environment - if(!string.IsNullOrEmpty(aasIdentifier)) + if (!string.IsNullOrEmpty(aasIdentifier)) { var aasFound = IsAssetAdministrationShellPresent(aasIdentifier, out AssetAdministrationShell aas, out int packageIndex); - if(aasFound) + if (aasFound) { body.SetAllParents(DateTime.UtcNow); _packages[packageIndex].AasEnv.Submodels.Add(body); @@ -1439,21 +1439,21 @@ public void UpdateFileByPathSubmodelRepo(string submodelIdentifier, string idSho if (fileElement is File file) { //Check if file has location - if(!string.IsNullOrEmpty(file.Value)) + if (!string.IsNullOrEmpty(file.Value)) { //check if it is external location - if(file.Value.StartsWith("http") || file.Value.StartsWith("https")) + if (file.Value.StartsWith("http") || file.Value.StartsWith("https")) { _logger.LogWarning($"Value of the Submodel-Element File with IdShort {file.IdShort} is an external link."); throw new NotImplementedException($"File location for {file.IdShort} is external {file.Value}. Currently this fuctionality is not supported."); } //Check if a directory - else if(file.Value.StartsWith('/') || file.Value.StartsWith('\\')) + else if (file.Value.StartsWith('/') || file.Value.StartsWith('\\')) { _logger.LogInformation($"Value of the Submodel-Element File with IdShort {file.IdShort} is a File-Path."); //check if the value consists file extension string sourcePath; - if(Path.HasExtension(file.Value)) + if (Path.HasExtension(file.Value)) { sourcePath = Path.GetDirectoryName(file.Value); //This should get platform specific path, without file name } @@ -1461,7 +1461,7 @@ public void UpdateFileByPathSubmodelRepo(string submodelIdentifier, string idSho { sourcePath = Path.Combine(file.Value); } - + var targetFile = Path.Combine(sourcePath, fileName); targetFile = targetFile.Replace('/', Path.DirectorySeparatorChar); Task task = _packages[packageIndex].ReplaceSupplementaryFileInPackageAsync(file.Value, targetFile, contentType, fileContent); @@ -1485,7 +1485,7 @@ public void UpdateFileByPathSubmodelRepo(string submodelIdentifier, string idSho file.Value = FormatFileName(targetFile); AasxServer.Program.signalNewData(2); } - + } else { diff --git a/src/docker/Dockerfile-AasxServerBlazor b/src/docker/Dockerfile-AasxServerBlazor index ed67636b2..1ab18c230 100644 --- a/src/docker/Dockerfile-AasxServerBlazor +++ b/src/docker/Dockerfile-AasxServerBlazor @@ -1,5 +1,5 @@ # It is expected that this docker is executed in the context of repository root. -FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /repo/src # Copy everything else and build @@ -7,7 +7,7 @@ COPY ./src/ /repo/src/ COPY ./LICENSE.TXT /repo/LICENSE.txt RUN dotnet publish -c Release -o /out/AasxServerBlazor AasxServerBlazor -FROM mcr.microsoft.com/dotnet/aspnet:3.1 as base +FROM mcr.microsoft.com/dotnet/aspnet:6.0 as base RUN apt-get update && apt-get install -y libgdiplus EXPOSE 51210 EXPOSE 51310 diff --git a/src/docker/Dockerfile-AasxServerBlazor-arm32 b/src/docker/Dockerfile-AasxServerBlazor-arm32 index 856e2626b..dc9c4afc8 100644 --- a/src/docker/Dockerfile-AasxServerBlazor-arm32 +++ b/src/docker/Dockerfile-AasxServerBlazor-arm32 @@ -1,5 +1,5 @@ # Based on https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.debian-arm32 -FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /repo/src # Copy everything else and build @@ -10,7 +10,7 @@ RUN dotnet restore -r linux-arm RUN dotnet publish -c Release -o /out/AasxServerBlazor AasxServerBlazor -r linux-arm --self-contained false --no-restore -FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim-arm32v7 as base +FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm32v7 as base # RUN apt-get update && apt-get install -y libgdiplus EXPOSE 5001 EXPOSE 51210 diff --git a/src/docker/Dockerfile-AasxServerBlazor-arm64 b/src/docker/Dockerfile-AasxServerBlazor-arm64 index 9cfd10069..d947754e4 100644 --- a/src/docker/Dockerfile-AasxServerBlazor-arm64 +++ b/src/docker/Dockerfile-AasxServerBlazor-arm64 @@ -10,7 +10,7 @@ RUN dotnet restore -r linux-arm64 RUN dotnet publish -c Release -o /out/AasxServerBlazor AasxServerBlazor -r linux-arm64 --self-contained false --no-restore -FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim-arm64v8 +FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim-arm64v8 EXPOSE 51210 EXPOSE 51310 COPY --from=build-env /out/AasxServerBlazor/ /AasxServerBlazor/ diff --git a/src/docker/Dockerfile-AasxServerCore b/src/docker/Dockerfile-AasxServerCore index 1595e3043..978981608 100644 --- a/src/docker/Dockerfile-AasxServerCore +++ b/src/docker/Dockerfile-AasxServerCore @@ -1,5 +1,5 @@ # It is expected that this docker is executed in the context of repository root. -FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /repo/src # Copy the source code and build @@ -7,7 +7,7 @@ COPY ./src/ /repo/src/ COPY ./LICENSE.TXT /repo/LICENSE.txt RUN dotnet publish -c Release -o /out/AasxServerCore AasxServerCore -FROM mcr.microsoft.com/dotnet/runtime:3.1 +FROM mcr.microsoft.com/dotnet/runtime:6.0 EXPOSE 51210 EXPOSE 51310 COPY --from=build-env /out/AasxServerCore/ /AasxServerCore/ diff --git a/src/docker/Dockerfile-AasxServerCore-arm32 b/src/docker/Dockerfile-AasxServerCore-arm32 index 967563363..9ffe36526 100644 --- a/src/docker/Dockerfile-AasxServerCore-arm32 +++ b/src/docker/Dockerfile-AasxServerCore-arm32 @@ -1,5 +1,5 @@ # Based on https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.debian-arm32 -FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /repo/src # Copy everything else and build @@ -10,7 +10,7 @@ RUN dotnet restore -r linux-arm RUN dotnet publish -c Release -o /out/AasxServerCore AasxServerCore -r linux-arm --self-contained false --no-restore -FROM mcr.microsoft.com/dotnet/runtime:3.1-buster-slim-arm32v7 +FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim-arm32v8 EXPOSE 51210 EXPOSE 51310 COPY --from=build-env /out/AasxServerCore/ /AasxServerCore/ diff --git a/src/docker/Dockerfile-AasxServerCore-arm64 b/src/docker/Dockerfile-AasxServerCore-arm64 index 20faf1273..4f233c0e9 100644 --- a/src/docker/Dockerfile-AasxServerCore-arm64 +++ b/src/docker/Dockerfile-AasxServerCore-arm64 @@ -1,5 +1,5 @@ # Based on https://github.com/dotnet/dotnet-docker/blob/master/samples/dotnetapp/Dockerfile.debian-arm32 -FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build-env +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env WORKDIR /repo/src # Copy everything else and build @@ -10,7 +10,7 @@ RUN dotnet restore -r linux-arm64 RUN dotnet publish -c Release -o /out/AasxServerCore AasxServerCore -r linux-arm64 --self-contained false --no-restore -FROM mcr.microsoft.com/dotnet/runtime:3.1-buster-slim-arm64v8 +FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye-slim-arm64v7 EXPOSE 51210 EXPOSE 51310 COPY --from=build-env /out/AasxServerCore/ /AasxServerCore/