Skip to content

Commit

Permalink
Dockerfile update for src path
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbres committed Dec 7, 2024
1 parent 3a20799 commit 586199d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/UptimeKumaRemoteProbe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["UptimeKumaRemoteProbe.csproj", "./"]
RUN dotnet restore "./UptimeKumaRemoteProbe.csproj"
COPY ["src/UptimeKumaRemoteProbe/UptimeKumaRemoteProbe.csproj", "src/UptimeKumaRemoteProbe/"]
RUN dotnet restore "./src/UptimeKumaRemoteProbe/UptimeKumaRemoteProbe.csproj"
COPY . .
WORKDIR "/src/"
WORKDIR "/src/src/UptimeKumaRemoteProbe"
RUN dotnet build "./UptimeKumaRemoteProbe.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "UptimeKumaRemoteProbe.csproj" -c Release -o /app/publish
RUN dotnet publish "./UptimeKumaRemoteProbe.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
Expand Down
6 changes: 3 additions & 3 deletions src/UptimeKumaRemoteProbe/Dockerfile.multiarch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["UptimeKumaRemoteProbe.csproj", "./"]
RUN dotnet restore "./UptimeKumaRemoteProbe.csproj"
COPY ["src/UptimeKumaRemoteProbe/UptimeKumaRemoteProbe.csproj", "src/UptimeKumaRemoteProbe/"]
RUN dotnet restore "./src/UptimeKumaRemoteProbe/UptimeKumaRemoteProbe.csproj"
COPY . .

ARG TARGETPLATFORM
Expand All @@ -13,7 +13,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-arm ; \
fi \
&& dotnet publish "UptimeKumaRemoteProbe.csproj" -c Release -o /app/publish -r $RID --self-contained false
&& dotnet publish "src/UptimeKumaRemoteProbe/UptimeKumaRemoteProbe.csproj" -c Release -o /app/publish -r $RID --self-contained false

FROM mcr.microsoft.com/dotnet/runtime:8.0 AS final
WORKDIR /app
Expand Down

0 comments on commit 586199d

Please sign in to comment.