Skip to content

Commit

Permalink
Merge pull request #9 from blackmoonfank:worker
Browse files Browse the repository at this point in the history
Create worker Dockerfile
  • Loading branch information
blackmoonfank committed Jun 10, 2023
2 parents 56b1b7c + 91225a8 commit 28ca0b1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,19 @@ RUN case ${TARGETPLATFORM} in \
"linux/arm64/v8") ARCH=arm64 ;; \
"linux/arm/v7") ARCH=arm ;; \
esac \
&& dotnet restore -r linux-${ARCH}
&& dotnet restore -r linux-${ARCH}

COPY . .
RUN case ${TARGETPLATFORM} in \
"linux/amd64") ARCH=x64 ;; \
"linux/arm64") ARCH=arm64 ;; \
"linux/arm64/v8") ARCH=arm64 ;; \
"linux/arm/v7") ARCH=arm ;; \
esac \
&& dotnet publish -c release -o /app -r linux-${ARCH} --self-contained false --no-restore

# app image
FROM mcr.microsoft.com/dotnet/runtime:7.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT [ "dotnet", "Worker.dll" ]

0 comments on commit 28ca0b1

Please sign in to comment.