From ee7d59da4780db289f0d87e4ff40a45c900e6ac3 Mon Sep 17 00:00:00 2001 From: Ekaterina Anishkina Date: Sun, 6 Feb 2022 00:41:25 +0300 Subject: [PATCH] fix(examples/with-docker): update env comments (#29972) This fixes the comment about disabling telemetry. For now it doesn't disable telemetry for `next build` if you uncomment it. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes --- examples/with-docker/Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/with-docker/Dockerfile b/examples/with-docker/Dockerfile index 05686a77bb0f73..9a478dd0b6c771 100644 --- a/examples/with-docker/Dockerfile +++ b/examples/with-docker/Dockerfile @@ -15,6 +15,12 @@ FROM node:16-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . + +# Next.js collects completely anonymous telemetry data about general usage. +# Learn more here: https://nextjs.org/telemetry +# Uncomment the following line in case you want to disable telemetry during the build. +# ENV NEXT_TELEMETRY_DISABLED 1 + RUN yarn build # Production image, copy all the files and run next @@ -22,6 +28,8 @@ FROM node:16-alpine AS runner WORKDIR /app ENV NODE_ENV production +# Uncomment the following line in case you want to disable telemetry during runtime. +# ENV NEXT_TELEMETRY_DISABLED 1 RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs @@ -42,9 +50,4 @@ EXPOSE 3000 ENV PORT 3000 -# Next.js collects completely anonymous telemetry data about general usage. -# Learn more here: https://nextjs.org/telemetry -# Uncomment the following line in case you want to disable telemetry. -# ENV NEXT_TELEMETRY_DISABLED 1 - CMD ["node", "server.js"]