Skip to content

Commit 08dc9de

Browse files
authored
Adds admin site to docker container (#166)
* All kinds of wierd changes * Pin the version of the admin site * no warn * ca-certs * use wget * fail
1 parent 74d03a9 commit 08dc9de

File tree

6 files changed

+41
-15
lines changed

6 files changed

+41
-15
lines changed

Docker/rootfs/etc/services.d/NetDaemon/finish

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/execlineb -S0
2+
3+
if -n { s6-test $# -ne 0 }
4+
if -n { s6-test ${1} -eq 256 }
5+
6+
s6-svscanctl -t /var/run/s6/services
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/with-contenv bash
2+
echo "Starting NetDaemon Admin"
3+
4+
cd /admin || exit 1
5+
6+
exec node ./host/admin.js
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/execlineb -S0
2+
3+
if -n { s6-test $# -ne 0 }
4+
if -n { s6-test ${1} -eq 256 }
5+
6+
s6-svscanctl -t /var/run/s6/services

Docker/rootfs/etc/services.d/NetDaemon/run renamed to Docker/rootfs/etc/services.d/NetDaemonApp/run

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
#!/bin/env bash
2-
3-
# ==============================================================================
4-
# NetDaemon Service
5-
# Starts NetDaemon
6-
# ==============================================================================
7-
set -e
1+
#!/usr/bin/with-contenv bash
2+
echo "Starting NetDaemon Runner"
83

94
declare runtype="Service"
105
declare daemondir="/daemon"

Dockerfile

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
11
# Build the NetDaemon with build container
2-
#mcr.microsoft.com/dotnet/core/sdk:3.1.200
3-
#ludeeus/container:dotnet-base
4-
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.200
2+
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.302
53

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

97
# COPY Docker/rootfs/etc /etc
10-
COPY ./Docker/rootfs/etc/services.d/NetDaemon/run /rundaemon
8+
COPY ./Docker/rootfs/etc /etc
9+
10+
# Install S6 and the Admin site
11+
RUN wget -qO /s6 \
12+
https://raw.githubusercontent.com/ludeeus/container/master/rootfs/s6/install \
13+
&& bash /s6 \
14+
\
15+
&& wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
16+
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
17+
\
18+
&& apt update && apt install -y \
19+
nodejs \
20+
yarn \
21+
make \
22+
\
23+
&& git clone https://github.com/net-daemon/admin.git /admin \
24+
&& cd /admin \
25+
&& git checkout tags/1.0.0 \
26+
&& make deploy
1127

1228
# Set default values of NetDaemon env
1329
ENV \
@@ -21,4 +37,4 @@ ENV \
2137
NETDAEMON__SOURCEFOLDER=/data
2238

2339

24-
ENTRYPOINT ["bash", "/rundaemon"]
40+
ENTRYPOINT ["/init"]

0 commit comments

Comments
 (0)