Switch to an alpine container and single file, self-contained deployments
This commit is contained in:
parent
1c64328587
commit
f25c9250ec
6 changed files with 6 additions and 3 deletions
|
@ -18,7 +18,7 @@ Build:
|
||||||
script:
|
script:
|
||||||
- dotnet restore
|
- dotnet restore
|
||||||
- dotnet test tests
|
- dotnet test tests
|
||||||
- dotnet publish --version-suffix "$VERSION" -r linux-x64 -c Release -o ./app ./src/Bot/
|
- dotnet publish --version-suffix "$VERSION" -r linux-musl-x64 -p:PublishSingleFile=true --self-contained true -c Release -o ./app ./src/Bot/
|
||||||
|
|
||||||
Package:
|
Package:
|
||||||
stage: docker
|
stage: docker
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine
|
||||||
|
|
||||||
COPY ./app /app/
|
COPY ./app /app/
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win10-x64;linux-x64;linux-musl-x64</RuntimeIdentifiers>
|
||||||
<ApplicationIcon>derp.ico</ApplicationIcon>
|
<ApplicationIcon>derp.ico</ApplicationIcon>
|
||||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<RootNamespace>Geekbot.Bot</RootNamespace>
|
<RootNamespace>Geekbot.Bot</RootNamespace>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win10-x64;linux-x64;linux-musl-x64</RuntimeIdentifiers>
|
||||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
||||||
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win10-x64;linux-x64;linux-musl-x64</RuntimeIdentifiers>
|
||||||
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
|
||||||
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
|
||||||
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.0-DEV</Version>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<RuntimeIdentifiers>win10-x64;linux-x64;linux-musl-x64</RuntimeIdentifiers>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<NoWarn>NU1701</NoWarn>
|
<NoWarn>NU1701</NoWarn>
|
||||||
<NoWarn>xUnit1026</NoWarn>
|
<NoWarn>xUnit1026</NoWarn>
|
||||||
|
|
Loading…
Reference in a new issue