eclipse-basyx / basyx-dotnet-applications

dotnet-applications
6 stars 4 forks source link

Add Dockerfile for AssetAdmistrationShellRepository #2

Open bjoernhoeper opened 2 years ago

bjoernhoeper commented 2 years ago

The Registry Server is already dockerized but a Dockerfile for the AssetAdministrationShellRepository is not yet implemented.

HansG89 commented 2 years ago

All of the basyx dotnet applications can be dockerized in the same way, by simply adding a Dockerfile like this:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY AasServer.csproj .
RUN dotnet restore AasServer.csproj
COPY .
RUN dotnet publish AasServer.csproj -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 5998
ENTRYPOINT ["dotnet", "AasServer.dll"]
bjoernhoeper commented 2 years ago

Yes I know but I think there should be one file for each of these in the repository. So the issue is more a work item to do that. And when that is done I would propose to also automate building the images and pushing them to a central registry. Mainly to foster adaptation by other users.

All of the basyx dotnet applications can be dockerized in the same way, by simply adding a Dockerfile like this:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY AasServer.csproj .
RUN dotnet restore AasServer.csproj
COPY .
RUN dotnet publish AasServer.csproj -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 5998
ENTRYPOINT ["dotnet", "AasServer.dll"]