File tree Expand file tree Collapse file tree 2 files changed +12
-14
lines changed
Expand file tree Collapse file tree 2 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22ARCH=$( uname -m)
3-
4- echo " UNAME IS!!!!: $ARCH "
5-
6- if [ $ARCH == " armv7l" ]; then
3+ echo " TARGET PLATFORM: $TARGETPLATFORM "
4+ if [ $TARGETPLATFORM == " linux/arm/v7" ]; then
75 dotnet publish /usr/src/Service/Service.csproj -v q -c Release -r " linux-arm" -o " /daemon"
8- elif [ $ARCH == " aarch64 " ]; then
9- dotnet publish /usr/src/Service/Service.csproj -v q -c Release -r " linux-arm " -o " /daemon"
10- elif [ $ARCH == " x86_64 " ]; then
6+ elif [ $TARGETPLATFORM == " linux/arm64 " ]; then
7+ dotnet publish /usr/src/Service/Service.csproj -v q -c Release -r " linux-arm64 " -o " /daemon"
8+ elif [ $TARGETPLATFORM == " linux/amd64 " ]; then
119 dotnet publish /usr/src/Service/Service.csproj -v q -c Release -r " linux-x64" -o " /daemon"
1210else
1311 echo ' NOT VALID BUILD' ; exit 1;
Original file line number Diff line number Diff line change 11# Build the NetDaemon Admin with build container
22FROM ludeeus/container:frontend as builder
33
4- ARG TARGETPLATFORM
5- ARG BUILDPLATFORM
6-
7- RUN echo "I am running on $BUILDPLATFORM" > /log
8- RUN echo "building for $TARGETPLATFORM" > /log
9-
10-
114RUN \
125 apk add make \
136 \
2215# Pre-build .NET NetDaemon core project
2316FROM mcr.microsoft.com/dotnet/sdk:5.0.101-buster-slim-amd64 as netbuilder
2417
18+ ARG TARGETPLATFORM
19+ ARG BUILDPLATFORM
20+
21+ RUN echo "I am running on $BUILDPLATFORM"
22+ RUN echo "building for $TARGETPLATFORM"
23+
24+ RUN export TARGETPLATFORM=$TARGETPLATFORM
2525# Copy the source to docker container
2626COPY ./src /usr/src
2727COPY ./Docker/build_dotnet.sh /build.sh
You can’t perform that action at this time.
0 commit comments