Skip to content

Commit e1f21d4

Browse files
committed
First pass
1 parent 6360fcf commit e1f21d4

File tree

20 files changed

+50
-85
lines changed

20 files changed

+50
-85
lines changed

Dockerfile

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,34 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM scratch
3+
## Buildstage ##
4+
FROM ghcr.io/linuxserver/baseimage-alpine:3.22 AS buildstage
45

5-
LABEL maintainer="username"
6+
ARG GIT_HASH=902a4ef
67

78
# copy local files
8-
COPY root/ /
9+
COPY root/ /root-layer/
10+
11+
RUN \
12+
echo "**** install build packages ****" && \h
13+
apk add --no-cache \
14+
curl build-base && \
15+
echo "**** get heyu source ****" && \
16+
mkdir -p /build && \
17+
cd /build && \
18+
curl -LsSo heyu.zip https://github.com/HeyuX10Automation/heyu/archive/${GIT_HASH}.zip && \
19+
unzip heyu.zip && \
20+
mv heyu-* heyu && \
21+
cd heyu && \
22+
echo "**** building heyu ****" && \
23+
./configure --sysconfdir=/config/heyu/ && \
24+
make && \
25+
make install prefix=/root-layer sysconfdir=/root-layer/defaults && \
26+
cd /
27+
28+
## Single layer deployed image ##
29+
FROM scratch
30+
31+
LABEL maintainer="dcflachs"
32+
33+
# Add files from buildstage
34+
COPY --from=buildstage /root-layer/ /

Dockerfile.complex

Lines changed: 0 additions & 33 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/dependencies.d/init-mods-package-install renamed to root/etc/s6-overlay/s6-rc.d/init-mod-homeassistant-heyu-setup/dependencies.d/init-mods-package-install

File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# This is an install script that is designed to run after init-mods-package-install
4+
# so it can take advantage of packages installed
5+
# init-mods-end depends on this script so that later init and services wait until this script exits
6+
7+
echo "**** Setting up heyu ****"
8+
9+
mkdir -p /config/heyu
10+
11+
12+
if [[ ! -f /config/heyu/x10config ]]; then
13+
cp /defaults/x10config.sample /config/heyu/x10config
14+
fi
15+
16+
if [[ ! -f /config/heyu/x10config ]]; then
17+
cp /defaults/x10.sched.sample /config/heyu/x10.sched
18+
fi
19+
20+
echo "**** heyu setup complete ****"

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/type renamed to root/etc/s6-overlay/s6-rc.d/init-mod-homeassistant-heyu-setup/type

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/s6-overlay/s6-rc.d/init-mod-homeassistant-heyu-setup/run

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/run

Lines changed: 0 additions & 30 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-add-package/up

Lines changed: 0 additions & 1 deletion
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/run

Lines changed: 0 additions & 8 deletions
This file was deleted.

root/etc/s6-overlay/s6-rc.d/init-mod-imagename-modname-install/type

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)