Skip to content

Commit 48b291e

Browse files
committed
add dockerfile
1 parent 28cf085 commit 48b291e

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

.dockerignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/bin
16+
**/charts
17+
**/docker-compose*
18+
**/Dockerfile*
19+
**/node_modules
20+
**/npm-debug.log
21+
**/obj
22+
**/secrets.dev.yaml
23+
**/values.dev.yaml
24+
LICENSE
25+
README.md

Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
2+
WORKDIR /app
3+
EXPOSE 80
4+
EXPOSE 443
5+
6+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
7+
WORKDIR /src
8+
9+
COPY ["src/Host/Host.csproj", "src/Host/"]
10+
COPY ["src/Shared/Shared.csproj", "src/Shared/"]
11+
COPY ["src/Client/Client.csproj", "src/Client/"]
12+
COPY ["src/Client.Infrastructure/Client.Infrastructure.csproj", "src/Client.Infrastructure/"]
13+
14+
RUN dotnet restore "src/Host/Host.csproj"
15+
16+
COPY . .
17+
WORKDIR "/src/src/Host"
18+
19+
RUN dotnet publish "Host.csproj" -c Release --no-restore -o /app/publish
20+
21+
FROM base AS final
22+
WORKDIR /app
23+
24+
COPY --from=build /app/publish .
25+
26+
ENTRYPOINT ["dotnet", "FSH.BlazorWebAssembly.Host.dll"]

FSH.BlazorWebAssembly.sln

+2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Client.Infrastructure", "sr
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F6BE3160-F6ED-4E11-A33F-063DD9186D84}"
1515
ProjectSection(SolutionItems) = preProject
16+
.dockerignore = .dockerignore
1617
.editorconfig = .editorconfig
1718
.gitignore = .gitignore
1819
Directory.Build.props = Directory.Build.props
1920
Directory.Build.targets = Directory.Build.targets
21+
Dockerfile = Dockerfile
2022
dotnet.ruleset = dotnet.ruleset
2123
global.json = global.json
2224
stylecop.json = stylecop.json

0 commit comments

Comments
 (0)