mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
use amd64 for web build
This commit is contained in:
parent
659b8ac305
commit
0ab6c99ecd
18
Dockerfile
18
Dockerfile
@ -119,8 +119,8 @@ EXPOSE 8555
|
|||||||
|
|
||||||
ENTRYPOINT ["/init"]
|
ENTRYPOINT ["/init"]
|
||||||
|
|
||||||
# Frigate deps with Node.js and NPM
|
# Frigate deps with Node.js and NPM for devcontainer
|
||||||
FROM deps AS deps-node
|
FROM deps AS devcontainer
|
||||||
|
|
||||||
# Install Node 16
|
# Install Node 16
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
@ -130,9 +130,6 @@ RUN apt-get update \
|
|||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& npm install -g npm@9
|
&& npm install -g npm@9
|
||||||
|
|
||||||
# Devcontainer
|
|
||||||
FROM deps-node AS devcontainer
|
|
||||||
|
|
||||||
WORKDIR /workspace/frigate
|
WORKDIR /workspace/frigate
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
@ -146,7 +143,8 @@ CMD ["sleep", "infinity"]
|
|||||||
|
|
||||||
|
|
||||||
# Frigate web build
|
# Frigate web build
|
||||||
FROM --platform=linux/amd64 deps-node AS web-build
|
# force this to run on amd64 because QEMU is painfully slow
|
||||||
|
FROM --platform=linux/amd64 node:16 AS web-build
|
||||||
|
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
COPY web/package.json web/package-lock.json ./
|
COPY web/package.json web/package-lock.json ./
|
||||||
@ -155,19 +153,13 @@ RUN npm install
|
|||||||
COPY web/ ./
|
COPY web/ ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Frigate web dist files
|
|
||||||
FROM scratch AS web-dist
|
|
||||||
|
|
||||||
COPY --from=web-build /work/dist/ /
|
|
||||||
|
|
||||||
# Collect final files in a single layer
|
# Collect final files in a single layer
|
||||||
FROM scratch AS rootfs
|
FROM scratch AS rootfs
|
||||||
|
|
||||||
WORKDIR /opt/frigate/
|
WORKDIR /opt/frigate/
|
||||||
COPY frigate frigate/
|
COPY frigate frigate/
|
||||||
COPY migrations migrations/
|
COPY migrations migrations/
|
||||||
COPY --from=web-dist / web/
|
COPY --from=web-build /work/dist/ web/
|
||||||
|
|
||||||
|
|
||||||
# Frigate final container
|
# Frigate final container
|
||||||
FROM deps
|
FROM deps
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user