[WIP] A simple wake-on-lan service
1ARG NODE_IMAGE=node:25.8-alpine3.22
2ARG RUST_IMAGE=rust:1.93.1-alpine3.22
3ARG ALPINE_IMAGE=alpine:3.22
4ARG PNPM_VERSION=^10.32.1
5
6# files bc kaniko is fucky
7FROM scratch AS files
8WORKDIR /ctx/
9COPY ./ /ctx/
10
11# front end
12FROM ${NODE_IMAGE} AS web
13
14RUN npm install -g pnpm@${PNPM_VERSION}
15WORKDIR /web
16COPY --from=files /ctx/web /web
17RUN pnpm install
18RUN pnpm run build
19
20# binary
21FROM ${RUST_IMAGE} AS build
22
23WORKDIR /app
24COPY --from=files /ctx/ /app
25COPY --from=web /web/dist /app/web/dist
26RUN cargo build --release
27
28# release container
29FROM scratch as release
30LABEL org.opencontainers.image.source=https://tangled.org/vielle.dev/wol
31
32WORKDIR /app
33COPY --from=files /ctx/favicon.ico /app
34COPY --from=files /ctx/wol.toml /app
35COPY --from=build /app/target/release/wol /app
36
37CMD ["/app/target/release/wol"]