-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile.ARM
51 lines (49 loc) · 1.39 KB
/
Dockerfile.ARM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM mcr.microsoft.com/dotnet/runtime:7.0-bullseye-slim-arm32v7 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim-arm32v7 AS build
WORKDIR /src
COPY ["fanuc/fanuc.csproj", "fanuc/"]
RUN dotnet restore "fanuc/fanuc.csproj"
COPY . .
WORKDIR "/src/fanuc"
RUN dotnet build "fanuc.csproj" \
-c Release \
-o /app/build \
/nowarn:CS0168 \
/nowarn:CS0618 \
/nowarn:CS0684 \
/nowarn:CS1998 \
/nowarn:CS8032 \
/nowarn:CS8600 \
/nowarn:CS8601 \
/nowarn:CS8602 \
/nowarn:CS8604 \
/nowarn:CS8625 \
/nowarn:CS8632 \
-p:DefineConstants=ARMV7
FROM build AS publish
RUN dotnet publish "fanuc.csproj" \
-c Release \
-o /app/publish \
/nowarn:CS0168 \
/nowarn:CS0618 \
/nowarn:CS0684 \
/nowarn:CS1998 \
/nowarn:CS8032 \
/nowarn:CS8600 \
/nowarn:CS8601 \
/nowarn:CS8602 \
/nowarn:CS8604 \
/nowarn:CS8625 \
/nowarn:CS8632 \
-p:DefineConstants=ARMV7
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
RUN mkdir -p /etc/fanuc
COPY examples/docker/config.system.yml /etc/fanuc/config.system.yml
COPY examples/docker/config.user.yml /etc/fanuc/config.user.yml
COPY examples/docker/config.machines.yml /etc/fanuc/config.machines.yml
COPY examples/docker/nlog.config /etc/fanuc/nlog.config
EXPOSE 7800-7900
ENTRYPOINT ["dotnet", "fanuc.dll", "--nlog", "/etc/fanuc/nlog.config", "--config", "/etc/fanuc/config.system.yml,/etc/fanuc/config.user.yml,/etc/fanuc/config.machines.yml"]