Added Dockerfile
Signed-off-by: Mia Winter <mia@miawinter.de>
This commit is contained in:
parent
388f17849e
commit
760203083a
30
.dockerignore
Normal file
30
.dockerignore
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/azds.yaml
|
||||||
|
**/bin
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
LICENSE
|
||||||
|
README.md
|
||||||
|
!**/.gitignore
|
||||||
|
!.git/HEAD
|
||||||
|
!.git/config
|
||||||
|
!.git/packed-refs
|
||||||
|
!.git/refs/heads/**
|
24
Wave/Dockerfile
Normal file
24
Wave/Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||||
|
USER app
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["Wave/Wave.csproj", "Wave/"]
|
||||||
|
RUN dotnet restore "./Wave/Wave.csproj"
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/Wave"
|
||||||
|
RUN dotnet build "./Wave.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
RUN dotnet publish "./Wave.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "Wave.dll"]
|
|
@ -1,29 +1,38 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
"profiles": {
|
||||||
"iisSettings": {
|
"http": {
|
||||||
"windowsAuthentication": false,
|
"commandName": "Project",
|
||||||
"anonymousAuthentication": true,
|
"launchBrowser": true,
|
||||||
"iisExpress": {
|
"environmentVariables": {
|
||||||
"applicationUrl": "http://localhost:49647",
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
"sslPort": 0
|
},
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"applicationUrl": "http://localhost:5272"
|
||||||
|
},
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profiles": {
|
"Container (Dockerfile)": {
|
||||||
"http": {
|
"commandName": "Docker",
|
||||||
"commandName": "Project",
|
"launchBrowser": true,
|
||||||
"dotnetRunMessages": true,
|
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||||
"launchBrowser": true,
|
"environmentVariables": {
|
||||||
"applicationUrl": "http://localhost:5272",
|
"ASPNETCORE_HTTP_PORTS": "8080"
|
||||||
"environmentVariables": {
|
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"IIS Express": {
|
"publishAllPorts": true
|
||||||
"commandName": "IISExpress",
|
}
|
||||||
"launchBrowser": true,
|
},
|
||||||
"environmentVariables": {
|
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"iisSettings": {
|
||||||
}
|
"windowsAuthentication": false,
|
||||||
}
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:49647",
|
||||||
|
"sslPort": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<UserSecretsId>aspnet-Wave-e004be03-56b7-4c24-aea7-ae4fda617143</UserSecretsId>
|
<UserSecretsId>aspnet-Wave-e004be03-56b7-4c24-aea7-ae4fda617143</UserSecretsId>
|
||||||
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in a new issue