feat: add NEXT_PUBLIC_LOCALE_PREFIX build argument to Dockerfile#574
Open
HardAndHeavy wants to merge 1 commit into
Open
feat: add NEXT_PUBLIC_LOCALE_PREFIX build argument to Dockerfile#574HardAndHeavy wants to merge 1 commit into
HardAndHeavy wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the missing
NEXT_PUBLIC_LOCALE_PREFIXbuild argument to the Dockerfile. Currently, building the image with--build-arg NEXT_PUBLIC_LOCALE_PREFIX=always(as suggested in the README for subpath deployments) fails because the argument is not declared and passed to the environment. This change aligns the Docker build process with the documented workflow.Changes
ARG NEXT_PUBLIC_LOCALE_PREFIX=to the builder stage in the Dockerfile.ENV NEXT_PUBLIC_LOCALE_PREFIX=$NEXT_PUBLIC_LOCALE_PREFIXafter theBASE_PATHenvironment variable to ensure it's available during the Next.js build.Related Issues
Related to the documented deployment instructions for subpaths. Fixes the build error when using the
--build-argflag as described in the README.Closes #
Type of Change
Checklist
npm run typecheck && npm run lintand there are no errorsnpm run build)locales/) if my changes affect user-facing text (N/A)Screenshots / Demo
N/A — build configuration change only.
Notes for Reviewers
This is a minimal change that simply declares the
ARGandENV, mirroring howNEXT_PUBLIC_BASE_PATHis already handled in the same Dockerfile. It does not change the default build behavior (since the variable defaults to empty).