From f7c81e829e88d12468e0cfae42167d5d87fe743c Mon Sep 17 00:00:00 2001 From: "Rodel E. Dagumampan" Date: Sun, 22 May 2022 20:18:11 +0200 Subject: [PATCH] Added new docker files for yuniql/cli image to support volume --- .../dockerfile.multi-stage-linux-x64-cli | 20 +++++++++++++++++++ .../docker/dockerfile.multi-stage-win-x64-cli | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 yuniql-distribution/docker/dockerfile.multi-stage-linux-x64-cli create mode 100644 yuniql-distribution/docker/dockerfile.multi-stage-win-x64-cli diff --git a/yuniql-distribution/docker/dockerfile.multi-stage-linux-x64-cli b/yuniql-distribution/docker/dockerfile.multi-stage-linux-x64-cli new file mode 100644 index 0000000..f6996da --- /dev/null +++ b/yuniql-distribution/docker/dockerfile.multi-stage-linux-x64-cli @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env + +WORKDIR /code + +# copy all files and directories from root src folder +COPY . . + +WORKDIR /code/yuniql-cli +RUN dotnet publish -c release -r linux-x64 /p:publishtrimmed=true -o ./app + +#https://github.com/dotnet/dotnet-docker/issues/1332 +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime-env + +WORKDIR app +COPY --from=build-env /code/yuniql-cli/app . + +ENV YUNIQL_WORKSPACE /data + +ENTRYPOINT ["dotnet", "yuniql.dll"] +CMD ["additional-arguments-captured-from-docker-run"] diff --git a/yuniql-distribution/docker/dockerfile.multi-stage-win-x64-cli b/yuniql-distribution/docker/dockerfile.multi-stage-win-x64-cli new file mode 100644 index 0000000..57b0bd2 --- /dev/null +++ b/yuniql-distribution/docker/dockerfile.multi-stage-win-x64-cli @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env + +WORKDIR /code + +# copy all files and directories from root src folder +COPY . . + +WORKDIR /code/yuniql-cli +RUN dotnet publish -c release -r win-x64 /p:publishtrimmed=true -o ./app + +#https://github.com/dotnet/dotnet-docker/issues/1332 +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime-env + +WORKDIR app +COPY --from=build-env /code/yuniql-cli/app . + +ENV YUNIQL_WORKSPACE /data + +ENTRYPOINT ["dotnet", "yuniql.dll"] +CMD ["additional-arguments-captured-from-docker-run"]