You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
633 B
25 lines
633 B
#FROM debian
|
|
|
|
# file: Dockerfile
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy everything from src-directory on host to workdir in image
|
|
COPY src .
|
|
|
|
# Build and publish a release to directory "out" (build implicitly restores NuGet packages)
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
# Build runtime image
|
|
FROM mcr.microsoft.com/dotnet/runtime:7.0
|
|
|
|
# install GPIO library (don't clean, need cache :-)
|
|
RUN apt-get -y update && apt-get -y install gpiod libgpiod2 libgpiod-dev
|
|
|
|
# set build- and run-time working directory
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/out /app
|
|
|
|
CMD ["dotnet", "/app/ASYD_JoystickLeds.dll"]
|
|
|