Skip to content

Commit f6baaf6

Browse files
committed
link server files to new location, and fix dockerfile for server build
1 parent 9f861e0 commit f6baaf6

38 files changed

+85
-20
lines changed

server/Dockerfile

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
2-
WORKDIR /app
1+
# https://hub.docker.com/_/microsoft-dotnet
2+
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
3+
WORKDIR /source
34

4-
# Copy csproj and restore as distinct layers
5-
COPY *.csproj ./
6-
RUN dotnet restore
5+
# copy csproj and restore as distinct layers
6+
COPY *.sln .
7+
COPY server/*.csproj ./server/
8+
RUN dotnet restore -r linux-x64
79

8-
# Copy everything else and build
9-
COPY . ./
10-
RUN dotnet publish -c Release -o out
10+
# copy everything else and build app
11+
COPY server/. ./server/
12+
WORKDIR /source/server
13+
RUN dotnet publish -c release -o /app -r linux-x64 --self-contained false --no-restore
1114

12-
# Build runtime image
13-
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
15+
# final stage/image
16+
FROM mcr.microsoft.com/dotnet/aspnet:5.0-focal-amd64
1417
WORKDIR /app
15-
COPY --from=build-env /app/out .
16-
ENTRYPOINT ["dotnet", "server.dll"]
18+
COPY --from=build /app ./
19+
ENTRYPOINT ["./server"]

server/server.sln

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27130.2027
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "server", "server\server.csproj", "{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1E1C7ABA-885A-4273-811E-B66AD28F9A87}"
9+
ProjectSection(SolutionItems) = preProject
10+
.dockerignore = .dockerignore
11+
aspnet-docker-dev-in-container.md = aspnet-docker-dev-in-container.md
12+
aspnetcore-docker-arm32.md = aspnetcore-docker-arm32.md
13+
aspnetcore-docker-arm64.md = aspnetcore-docker-arm64.md
14+
deploy-container-to-aci.md = deploy-container-to-aci.md
15+
Directory.Build.props = Directory.Build.props
16+
Dockerfile = Dockerfile
17+
README.md = README.md
18+
EndProjectSection
19+
EndProject
20+
Global
21+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
22+
Debug|Any CPU = Debug|Any CPU
23+
Debug|x64 = Debug|x64
24+
Debug|x86 = Debug|x86
25+
Release|Any CPU = Release|Any CPU
26+
Release|x64 = Release|x64
27+
Release|x86 = Release|x86
28+
EndGlobalSection
29+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
30+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|Any CPU.Build.0 = Debug|Any CPU
32+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|x64.ActiveCfg = Debug|Any CPU
33+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|x64.Build.0 = Debug|Any CPU
34+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|x86.ActiveCfg = Debug|Any CPU
35+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Debug|x86.Build.0 = Debug|Any CPU
36+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|x64.ActiveCfg = Release|Any CPU
39+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|x64.Build.0 = Release|Any CPU
40+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|x86.ActiveCfg = Release|Any CPU
41+
{5FDCC1ED-9F59-47ED-969D-5E463CDD8D52}.Release|x86.Build.0 = Release|Any CPU
42+
EndGlobalSection
43+
GlobalSection(SolutionProperties) = preSolution
44+
HideSolutionNode = FALSE
45+
EndGlobalSection
46+
GlobalSection(ExtensibilityGlobals) = postSolution
47+
SolutionGuid = {C9A7C5A2-5C90-4AD9-ABB8-6F2D2364D5AF}
48+
EndGlobalSection
49+
EndGlobal
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)