mirror of
https://github.com/jakeswenson/BitBetter.git
synced 2023-10-10 13:36:57 +02:00
Build licenseGen in Docker
This way we don't have to install dotnet sdk on the host
This commit is contained in:
parent
7aa9b08d45
commit
c97df32b0d
@ -1,5 +1,16 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 as build
|
||||
|
||||
WORKDIR /licenseGen
|
||||
|
||||
COPY . /licenseGen
|
||||
|
||||
RUN dotnet add package Newtonsoft.Json --version 12.0.1 \
|
||||
&& dotnet restore \
|
||||
&& dotnet publish
|
||||
|
||||
|
||||
FROM bitbetter/api
|
||||
|
||||
COPY bin/Debug/netcoreapp2.0/publish/* /app/
|
||||
COPY --from=build /licenseGen/bin/Debug/netcoreapp2.0/publish/* /app/
|
||||
|
||||
ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ]
|
||||
ENTRYPOINT [ "dotnet", "/app/licenseGen.dll", "--core", "/app/Core.dll", "--cert", "/cert.pfx" ]
|
||||
|
@ -1,11 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
script_dir=`cd $(dirname $0); pwd`
|
||||
|
||||
cd "$script_dir"
|
||||
|
||||
dotnet restore
|
||||
dotnet publish
|
||||
|
||||
docker build . -t bitbetter/licensegen # --squash
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
docker build -t bitbetter/licensegen "$DIR" # --squash
|
||||
|
@ -14,5 +14,5 @@ elif [ "$#" -ge "2" ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
docker run -it -v "$cert_path:/cert.pfx" bitbetter/licensegen "$@"
|
||||
docker run -it --rm -v "$cert_path:/cert.pfx" bitbetter/licensegen "$@"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user