Bird
0
0

You want to optimize your Remix app Docker image by installing only production dependencies. Which command should replace 'RUN npm install'?

hard📝 Application Q8 of 15
Remix - Deployment
You want to optimize your Remix app Docker image by installing only production dependencies. Which command should replace 'RUN npm install'?
ARUN npm install --production
BRUN npm install --dev
CRUN npm install --all
DRUN npm install --no-save
Step-by-Step Solution
Solution:
  1. Step 1: Understand npm install flags

    --production installs only dependencies needed to run app, skipping dev tools.
  2. Step 2: Evaluate other flags

    --dev installs dev dependencies, --all is invalid, --no-save affects package.json, not install scope.
  3. Final Answer:

    RUN npm install --production -> Option A
  4. Quick Check:

    Install only production deps = --production flag [OK]
Quick Trick: Use --production to skip dev dependencies [OK]
Common Mistakes:
MISTAKES
  • Using --dev instead of --production
  • Assuming --all installs everything
  • Confusing --no-save with dependency scope

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Remix Quizzes