Last active
April 25, 2020 21:39
-
-
Save thnk2wn/65eb8091a8296bbaeed46bd52bbd978a to your computer and use it in GitHub Desktop.
Debug version. Deploying to Raspberry Pi with GitHub Actions and Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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