You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building my project from the command line locally, just using pnpm next build, repository discovery happens as expected. However, when using Docker, I get a warning:
warn [nextra] Init git repository failed Discover git repo from [/app/docs] failed: could not find repository at '/app/docs'; class=Repository (6); code=NotFound (-3)
Project lives in a monorepo, with docs housing the Nextra app, first level subdirectory, running Nextra 4.2.7. Below is a Dockerfile I used to debug this, with git installed to confirm the repository is copied correctly (run container interactively with sh, run git status in build directory to confirm).
FROM node:20-alpine AS alpine
RUN apk update
RUN apk add --no-cache libc6-compat
FROM alpine AS base
RUN npm install pnpm --global
RUN pnpm config set store-dir ~/.pnpm-store
FROM base AS deps
WORKDIR /app/docs
COPY docs/package.json docs/pnpm-lock.yaml ./
RUN pnpm i --frozen-lockfile
FROM base AS builder
RUN apk add --no-cache git
WORKDIR /app
COPY .git .git
WORKDIR /app/docs
COPY --from=deps /app/docs/node_modules ./node_modules
COPY ./docs .
# Build the applicationENV NEXT_TELEMETRY_DISABLED=1
RUN pnpm build
The text was updated successfully, but these errors were encountered:
When building my project from the command line locally, just using
pnpm next build
, repository discovery happens as expected. However, when using Docker, I get a warning:Project lives in a monorepo, with
docs
housing the Nextra app, first level subdirectory, running Nextra 4.2.7. Below is aDockerfile
I used to debug this, withgit
installed to confirm the repository is copied correctly (run container interactively withsh
, rungit status
in build directory to confirm).The text was updated successfully, but these errors were encountered: