Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pull-dog.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{
}
"dockerComposeYmlFilePaths": [ "src/docker-compose.yml" ],
"additionalPaths": [ "src" ]
}
25 changes: 25 additions & 0 deletions src/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.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
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample/FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample.csproj", "FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample/"]
COPY ["FluffySpoon.AspNet.EncryptWeMust.EntityFramework/FluffySpoon.AspNet.EncryptWeMust.EntityFramework.csproj", "FluffySpoon.AspNet.EncryptWeMust.EntityFramework/"]
COPY ["FluffySpoon.AspNet.EncryptWeMust/FluffySpoon.AspNet.EncryptWeMust.csproj", "FluffySpoon.AspNet.EncryptWeMust/"]
RUN dotnet restore "FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample/FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample.csproj"
COPY . .
WORKDIR "/src/FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample"
RUN dotnet build "FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,6 +13,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:55633",
"sslPort": 0
Expand All @@ -18,10 +18,16 @@
"FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"applicationUrl": "http://localhost:5000"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true
}
}
}
23 changes: 23 additions & 0 deletions src/FluffySpoon.AspNet.EncryptWeMust.Sample/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["FluffySpoon.AspNet.EncryptWeMust.Sample/FluffySpoon.AspNet.EncryptWeMust.Sample.csproj", "FluffySpoon.AspNet.EncryptWeMust.Sample/"]
COPY ["FluffySpoon.AspNet.EncryptWeMust/FluffySpoon.AspNet.EncryptWeMust.csproj", "FluffySpoon.AspNet.EncryptWeMust/"]
RUN dotnet restore "FluffySpoon.AspNet.EncryptWeMust.Sample/FluffySpoon.AspNet.EncryptWeMust.Sample.csproj"
COPY . .
WORKDIR "/src/FluffySpoon.AspNet.EncryptWeMust.Sample"
RUN dotnet build "FluffySpoon.AspNet.EncryptWeMust.Sample.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "FluffySpoon.AspNet.EncryptWeMust.Sample.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "FluffySpoon.AspNet.EncryptWeMust.Sample.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<UserSecretsId>5a77d89d-6eaa-4c7e-9465-8dacffbb1a3d</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,6 +18,7 @@
<PackageReference Include="Microsoft.AspNetCore.Server.WebListener" Version="1.1.4" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost"
},
"Docker": {
"commandName": "Docker",
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": true
}
}
}
6 changes: 6 additions & 0 deletions src/FluffySpoon.AspNet.EncryptWeMust.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluffySpoon.AspNet.EncryptW
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluffySpoon.AspNet.EncryptWeMust.Tests", "FluffySpoon.AspNet.EncryptWeMust.Tests\FluffySpoon.AspNet.EncryptWeMust.Tests.csproj", "{C9071FEE-4116-474F-B2B1-61766EAE0907}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{05303AB7-FDCC-474D-92F1-A7BD1E69E2E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -51,6 +53,10 @@ Global
{C9071FEE-4116-474F-B2B1-61766EAE0907}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9071FEE-4116-474F-B2B1-61766EAE0907}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9071FEE-4116-474F-B2B1-61766EAE0907}.Release|Any CPU.Build.0 = Release|Any CPU
{05303AB7-FDCC-474D-92F1-A7BD1E69E2E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05303AB7-FDCC-474D-92F1-A7BD1E69E2E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05303AB7-FDCC-474D-92F1-A7BD1E69E2E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05303AB7-FDCC-474D-92F1-A7BD1E69E2E2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
18 changes: 18 additions & 0 deletions src/docker-compose.dcproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
<PropertyGroup Label="Globals">
<ProjectVersion>2.1</ProjectVersion>
<DockerTargetOS>Linux</DockerTargetOS>
<ProjectGuid>05303ab7-fdcc-474d-92f1-a7bd1e69e2e2</ProjectGuid>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}</DockerServiceUrl>
<DockerServiceName>fluffyspoon.aspnet.encryptwemust.entityframework.sample</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include="docker-compose.override.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" />
<None Include=".dockerignore" />
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions src/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3.4'

services:
fluffyspoon.aspnet.encryptwemust.sample:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
ports:
- "80"
- "443"
volumes:
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
fluffyspoon.aspnet.encryptwemust.entityframework.sample:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "80"

20 changes: 20 additions & 0 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3.4'

services:
fluffyspoon-sample:
build:
context: .
dockerfile: FluffySpoon.AspNet.EncryptWeMust.Sample/Dockerfile

ports:
- "80:80"
- "443:443"

fluffyspoon-entityframework-sample:
build:
context: .
dockerfile: FluffySpoon.AspNet.EncryptWeMust.EntityFramework.Sample/Dockerfile

ports:
- "81:80"
- "444:443"