diff --git a/core/Dockerfile b/core/Dockerfile index fc2573e0b3..9206a2f132 100644 --- a/core/Dockerfile +++ b/core/Dockerfile @@ -1,3 +1,9 @@ +FROM node:current-buster-slim AS frontendBuilder + +# Build frontend +COPY frontend /home/pi/frontend +RUN cd /home/pi/frontend && yarn install && yarn build --skip-plugins @vue/cli-plugin-eslint + FROM bluerobotics/companion-base:v0.0.1 # Install necessary tools @@ -23,5 +29,8 @@ COPY services /home/pi/services COPY start-companion-core /usr/bin/start-companion-core RUN /home/pi/services/install-services.sh +# Copy frontend built on frontendBuild to this stage +COPY --from=frontendBuilder /home/pi/frontend/dist /home/pi/frontend + # Start ENTRYPOINT /usr/bin/start-companion-core && sleep infinity