-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ some other changes for the view-returns
- Loading branch information
1 parent
927221c
commit 98daf30
Showing
5 changed files
with
45 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
#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/sdk:8.0 AS build | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
# Modells | ||
WORKDIR /src/Modells | ||
COPY Modells/Modells.csproj . | ||
RUN dotnet restore Modells.csproj | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
# LiteDbLib | ||
WORKDIR /src/LiteDbLib | ||
COPY LiteDbLib/LiteDbLib.csproj . | ||
RUN dotnet restore LiteDbLib.csproj | ||
|
||
# API | ||
WORKDIR /src/AmIVulnerable | ||
COPY AmIVulnerable/AmIVulnerable.csproj . | ||
RUN dotnet restore AmIVulnerable.csproj | ||
|
||
# API build | ||
WORKDIR /src | ||
COPY ["AmIVulnerable/AmIVulnerable.csproj", "AmIVulnerable/"] | ||
RUN dotnet restore "./AmIVulnerable/./AmIVulnerable.csproj" | ||
COPY . . | ||
WORKDIR "/src/AmIVulnerable" | ||
RUN dotnet build "./AmIVulnerable.csproj" -c $BUILD_CONFIGURATION -o /app/build | ||
RUN dotnet build AmIVulnerable/AmIVulnerable.csproj -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
ARG BUILD_CONFIGURATION=Release | ||
RUN dotnet publish "./AmIVulnerable.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||
RUN dotnet publish AmIVulnerable/AmIVulnerable.csproj -c Release -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
WORKDIR /app | ||
COPY AmIVulnerable/Controllers/Views /app/Controllers/Views | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "AmIVulnerable.dll"] | ||
ENTRYPOINT ["dotnet", "AmIVulnerable.dll"] | ||
|
||
EXPOSE 80 | ||
EXPOSE 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
version: '3.4' | ||
|
||
networks: | ||
amivulnerable: | ||
# networks: | ||
# amivulnerable: | ||
|
||
# services: | ||
# amivulnerable: | ||
# networks: | ||
# - amivulnerable | ||
# container_name: api | ||
# image: amivulnerable:latest | ||
# build: | ||
# context: . | ||
# dockerfile: AmIVulnerable/Dockerfile | ||
# ports: | ||
# - "8080:80" | ||
# - "8443:443" | ||
|
||
services: | ||
amivulnerable: | ||
networks: | ||
- amivulnerable | ||
container_name: api | ||
image: amivulnerable:latest | ||
build: | ||
context: . | ||
dockerfile: AmIVulnerable/Dockerfile | ||
ports: | ||
- "8080:80" | ||
- "8443:443" | ||
- 8080:80 | ||
- 8443:443 |