-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
24 lines (21 loc) · 845 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM node:13-alpine AS node
COPY web/ /web
WORKDIR /web
RUN npm install && npm run build
FROM golang:1.13-alpine AS builder
COPY firmware/ /build
COPY --from=node /web/dist/ /web/
RUN apk add make upx git
WORKDIR /build
RUN mkdir /dist && make clean all
#FROM jdevelop/passkeeper:buildroot-2018.08.2-rpi-zero-w as buildroot
FROM jdevelop/passkeeper:buildroot-2018.08.2-rpi-zero as buildroot
COPY --from=builder /dist/ /build/board/rootfs_overlay/root/
COPY buildroot/.config /build/.config
COPY buildroot/linux-config /build/linux-config
WORKDIR /build
RUN make O=/build PASSKEEPER=/build FORCE_UNSAFE_CONFIGURE=1 -C /buildroot/buildroot-2018.08.2 linux-rebuild
RUN make O=/build PASSKEEPER=/build FORCE_UNSAFE_CONFIGURE=1 -C /buildroot/buildroot-2018.08.2
FROM alpine:3.10
COPY --from=buildroot /build/images/sdcard.img /dist/
WORKDIR /dist