mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
de-couple debug v. prod base build step
This commit is contained in:
parent
2e1942843a
commit
0bbfd99aa7
5 changed files with 29 additions and 17 deletions
|
|
@ -5,4 +5,12 @@ services:
|
|||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./ops/nginx/conf.d.dev:/etc/nginx/conf.d:ro
|
||||
- ./ops/nginx/conf.d.dev:/etc/nginx/conf.d:ro
|
||||
|
||||
api:
|
||||
build:
|
||||
dockerfile: server/src/FilterLists.Api/debug.Dockerfile
|
||||
|
||||
agent:
|
||||
build:
|
||||
dockerfile: server/src/FilterLists.Agent/debug.Dockerfile
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
# Context: .
|
||||
# Command: docker build -f server/src/FilterLists.Agent/Dockerfile .
|
||||
|
||||
# init base debug (for VS)
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
|
||||
WORKDIR /app
|
||||
|
||||
# init base-prod
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine as base-prod
|
||||
# init base
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine as base
|
||||
ENTRYPOINT ["./FilterLists.Agent"]
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -40,5 +36,5 @@ FROM build AS publish
|
|||
RUN dotnet publish -c Release -r linux-musl-x64 -o out --no-restore --no-build
|
||||
|
||||
# final
|
||||
FROM base-prod as final
|
||||
FROM base as final
|
||||
COPY --from=publish /app/src/FilterLists.Agent/out .
|
||||
|
|
|
|||
6
server/src/FilterLists.Agent/debug.Dockerfile
Normal file
6
server/src/FilterLists.Agent/debug.Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Context: .
|
||||
# Command: docker build -f server/src/FilterLists.Agent/debug.Dockerfile .
|
||||
|
||||
# init base debug (for VS)
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
|
||||
WORKDIR /app
|
||||
|
|
@ -1,14 +1,8 @@
|
|||
# Context: .
|
||||
# Command: docker build -f server/src/FilterLists.Api/Dockerfile .
|
||||
|
||||
# init base debug (for VS)
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
|
||||
EXPOSE 80
|
||||
COPY data/. data/
|
||||
WORKDIR /app
|
||||
|
||||
# init base-prod
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine as base-prod
|
||||
# init base
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine as base
|
||||
ENTRYPOINT ["./FilterLists.Api"]
|
||||
EXPOSE 80
|
||||
COPY data/. data/
|
||||
|
|
@ -67,5 +61,5 @@ FROM build AS publish
|
|||
RUN dotnet publish -c Release -r linux-musl-x64 -o out --no-restore --no-build
|
||||
|
||||
# final
|
||||
FROM base-prod as final
|
||||
FROM base as final
|
||||
COPY --from=publish /app/src/FilterLists.Api/out .
|
||||
|
|
|
|||
8
server/src/FilterLists.Api/debug.Dockerfile
Normal file
8
server/src/FilterLists.Api/debug.Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Context: .
|
||||
# Command: docker build -f server/src/FilterLists.Api/debug.Dockerfile .
|
||||
|
||||
# init base debug (for VS)
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
|
||||
EXPOSE 80
|
||||
COPY data/. data/
|
||||
WORKDIR /app
|
||||
Loading…
Reference in a new issue