#build-frontend:
#  stage: build-apps
#  image: node:22-alpine
#  script:
#    - ls base
#    - cd base/edge-frontend/
#    - yarn install
#    - yarn run build
#  artifacts:
#    when: always
#    paths:
#      - base/edge-frontend/out/

FROM node:22-alpine AS build

WORKDIR /app
COPY . /app

RUN yarn install && yarn build
#RUN yarn install --frozen-lockfile --no-progress && yarn build
#RUN --mount=type=bind,target=/app/src yarn build --modules-folder /app/node_modules

FROM scratch
#FROM alpine:latest
COPY --from=build /app/out/ /out
COPY --from=build /app/yarn.lock /

# docker build --output=. .

