diff --git a/.dockerignore b/.dockerignore index 75888e7..e69de29 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +0,0 @@ -Dockerfile -**/*/ -!PortainerClient/bin/Release/net7.0/linux-x64/publish/PortainerClient diff --git a/Dockerfile b/Dockerfile index 5895f10..7fdbd5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ -FROM ubuntu:20.04 - -WORKDIR / -COPY "PortainerClient/bin/Release/net7.0/linux-x64/publish/PortainerClient" "/usr/bin/portainerctl" - +FROM bitnami/dotnet-sdk:7 AS build +COPY . /tmp +WORKDIR /tmp +RUN dotnet publish -c Release +FROM ubuntu:23.10 +WORKDIR /app +COPY --from=build "tmp/PortainerClient/src/UltraMafia/bin/Release/net7.0/linux-x64/publish/PortainerClient" "/usr/bin/portainerctl" RUN chmod +x /usr/bin/portainerctl