Add .zshrc configuration for production Docker images #17
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.
Problem
The production Docker images set zsh as the default shell (via
useradd -s /bin/zsh), but no.zshrcconfiguration file was being copied to the production stage. This resulted in an unconfigured zsh shell when users interacted with production containers, potentially causing a suboptimal user experience or errors when zsh-specific features were expected.Solution
Created a production-appropriate
.zshrc.prodconfiguration file and updated both Dockerfile variants (Bookworm and Alpine) to copy it into production images.Changes
New file:
.zshrc.prod(56 lines)env.shto make Laravel/PHP aliases available (pint, pa, stan, pest, etc.)gitplugin (included by default)Updated production stages in both
Dockerfileandalpine.DockerfileUpdated
README-ALPINE.md.zshrc.prodto file structure documentationEnhanced
test.phpto include missing dev-only binariesfzf(fuzzy finder)eza(modern ls replacement)starship(shell prompt)zoxide(smarter cd command)opencode(code editor)Dev vs Production Configuration
Benefits
Testing
Users can verify the fix by running:
The test script now validates all binaries including fzf and other dev-only tools to ensure proper separation between production and development environments.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.