Skip to content

Commit

Permalink
Merge 60ff169 into 74d03a9
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 21, 2020
2 parents 74d03a9 + 60ff169 commit 5f656c7
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 15 deletions.
3 changes: 0 additions & 3 deletions Docker/rootfs/etc/services.d/NetDaemon/finish

This file was deleted.

6 changes: 6 additions & 0 deletions Docker/rootfs/etc/services.d/NetDaemonAdmin/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/execlineb -S0

if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }

s6-svscanctl -t /var/run/s6/services
6 changes: 6 additions & 0 deletions Docker/rootfs/etc/services.d/NetDaemonAdmin/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/with-contenv bash
echo "Starting NetDaemon Admin"

cd /admin || exit 1

exec node ./host/admin.js
6 changes: 6 additions & 0 deletions Docker/rootfs/etc/services.d/NetDaemonApp/finish
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/execlineb -S0

if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }

s6-svscanctl -t /var/run/s6/services
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/env bash

# ==============================================================================
# NetDaemon Service
# Starts NetDaemon
# ==============================================================================
set -e
#!/usr/bin/with-contenv bash
echo "Starting NetDaemon Runner"

declare runtype="Service"
declare daemondir="/daemon"
Expand Down
26 changes: 21 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
# Build the NetDaemon with build container
#mcr.microsoft.com/dotnet/core/sdk:3.1.200
#ludeeus/container:dotnet-base
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.200
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.302

# Copy the source to docker container
COPY ./src /usr/src

# COPY Docker/rootfs/etc /etc
COPY ./Docker/rootfs/etc/services.d/NetDaemon/run /rundaemon
COPY ./Docker/rootfs/etc /etc

# Install S6 and the Admin site
RUN wget -qO /s6 \
https://raw.githubusercontent.com/ludeeus/container/master/rootfs/s6/install \
&& bash /s6 \
\
&& wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
\
&& apt update && apt install -y \
nodejs \
yarn \
make \
\
&& git clone https://github.com/net-daemon/admin.git /admin \
&& cd /admin \
&& git checkout tags/1.0.0 \
&& make deploy

# Set default values of NetDaemon env
ENV \
Expand All @@ -21,4 +37,4 @@ ENV \
NETDAEMON__SOURCEFOLDER=/data


ENTRYPOINT ["bash", "/rundaemon"]
ENTRYPOINT ["/init"]

0 comments on commit 5f656c7

Please sign in to comment.