@@ -5,9 +5,35 @@ ARG BASE_IMAGE=ghcr.io/ublue-os/bluefin-dx:stable-daily
55FROM scratch AS ctx
66COPY build_files /
77
8+ # Build Elephant from source (cached layer)
9+ FROM ${BASE_IMAGE} AS elephant-builder
10+ COPY packages/elephant/build.sh /tmp/build-elephant.sh
11+ RUN --mount=type=cache,dst=/var/cache \
12+ --mount=type=cache,dst=/var/log \
13+ --mount=type=tmpfs,dst=/tmp/build \
14+ chmod +x /tmp/build-elephant.sh && \
15+ /tmp/build-elephant.sh
16+
17+ # Build Walker from source (cached layer)
18+ FROM ${BASE_IMAGE} AS walker-builder
19+ COPY packages/walker/build.sh /tmp/build-walker.sh
20+ RUN --mount=type=cache,dst=/var/cache \
21+ --mount=type=cache,dst=/var/log \
22+ --mount=type=tmpfs,dst=/tmp/build \
23+ chmod +x /tmp/build-walker.sh && \
24+ /tmp/build-walker.sh
25+
826# Base Image
927FROM ${BASE_IMAGE}
1028
29+ # Copy Elephant binary and service from builder
30+ COPY --from=elephant-builder /usr/bin/elephant /usr/bin/elephant
31+ COPY --from=elephant-builder /usr/lib/systemd/user/elephant.service /usr/lib/systemd/user/elephant.service
32+
33+ # Copy Walker binary and resources from builder
34+ COPY --from=walker-builder /usr/bin/walker /usr/bin/walker
35+ COPY --from=walker-builder /usr/share/walker /usr/share/walker
36+
1137# Copy dot_files into the image at /usr/share/binaryos/config
1238COPY dot_files /usr/share/binaryos/config
1339
0 commit comments