forked from net-daemon/netdaemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (22 loc) · 1.06 KB
/
Dockerfile
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
# Pre-build .NET NetDaemon core project
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim-amd64 as netbuilder
#FROM mcr.microsoft.com/dotnet/sdk:8.0 as netbuilder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on ${BUILDPLATFORM}"
RUN echo "building for ${TARGETPLATFORM}"
RUN export TARGETPLATFORM="${TARGETPLATFORM}"
# Copy the source to docker container
COPY . /usr
RUN dotnet publish /usr/src/Host/NetDaemon.Host.Default/NetDaemon.Host.Default.csproj -o "/daemon"
# Final stage, create the runtime container
FROM ghcr.io/net-daemon/netdaemon_base:8
# # Install S6 and the Admin site
# COPY ./Docker/rootfs/etc/services.d/NetDaemonAdmin /etc/services.d/NetDaemonAdmin
COPY --chmod=755 ./Docker/rootfs/etc/services.d/netdaemon /etc/s6-overlay/s6-rc.d/netdaemon
COPY --chmod=755 ./Docker/rootfs/etc/s6-overlay/s6-rc.d/usr/netdaemon etc/s6-overlay/s6-rc.d/user/contents.d/netdaemon
# COPY admin
# COPY --from=builder /admin /admin
COPY --from=netbuilder /daemon /daemon
# This is always set to data as default
ENV NetDaemon__ApplicationConfigurationFolder=/data