Skip to content

Instantly share code, notes, and snippets.

@thnk2wn
Last active April 25, 2020 21:39
Show Gist options
  • Save thnk2wn/65eb8091a8296bbaeed46bd52bbd978a to your computer and use it in GitHub Desktop.
Save thnk2wn/65eb8091a8296bbaeed46bd52bbd978a to your computer and use it in GitHub Desktop.
Debug version. Deploying to Raspberry Pi with GitHub Actions and Docker
ARG QEMU="false"
# Stage 1 - build
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.102 AS build
ARG QEMU
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
WORKDIR /build
COPY . .
RUN echo $(ls .)
RUN dotnet restore
RUN dotnet publish -c Debug -o /app
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.2-buster-slim-arm32v7 AS final
ARG QEMU
COPY qemu-arm-static /usr/bin/qemu-arm-static
# Had issues with conditional try - idea was to reuse debug docker file for both local and CI
#RUN if [ "${QEMU}" = "true" ] ; then \
# COPY qemu-arm-static /usr/bin/qemu-arm-static; \
# fi
WORKDIR /app
COPY --from=build /app .
RUN apt update && \
apt install unzip && \
curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l /vsdbg
# Same environment variables as before
ENTRYPOINT ["dotnet", "./siren.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment