diff --git a/Dockerfile b/Dockerfile index fcffa52db..99ef4780d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,8 @@ -FROM node:18 AS build -ARG command -ENV USE_ONE_DIST_DIR=true +FROM node:18 RUN corepack enable WORKDIR /talisman COPY . ./ RUN pnpm install -RUN pnpm $command - -FROM scratch AS export -COPY --from=build /talisman/apps/extension/dist/*.zip / +ENV USE_ONE_DIST_DIR=true diff --git a/package.json b/package.json index 2653d71ee..3d1742b96 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "build:extension:canary:firefox": "turbo run build:extension:canary:firefox", "build:extension:prod": "turbo run build:extension:prod", "build:extension:prod:firefox": "turbo run build:extension:prod:firefox", - "build:review": "docker build . --build-arg command=build:extension:prod --target export --output review", - "build:review:firefox": "docker build . --build-arg command=build:extension:prod:firefox --target export --output review", + "build:review": "rm -rf review && mkdir review && docker build . --tag talisman-builder && docker run --rm --volume ./review:/review bash -c 'pnpm build:extension:prod && cp /talisman/apps/extension/dist/*.zip /review/'", + "build:review:firefox": "rm -rf review && mkdir review && docker build . --tag talisman-builder && docker run --rm --volume ./review:/review bash -c 'pnpm build:extension:prod:firefox && cp /talisman/apps/extension/dist/*.zip /review/'", "lint": "pnpm run -r --parallel lint", "test": "pnpm run -r --parallel test", "clean": "pnpm run -r --parallel clean & rm -rf dist .turbo node_modules & wait"