Production API image
Your task
Build a Node API image for production. The app is a small service that runs without a build step. What to do: complete Dockerfile. Note: start the app with node src/server.js.
Ground rules
- •Use /app as the working directory in the image.
- •Copy only files needed for production runtime.
Not required
- •Kubernetes manifests.
- •Database, cache, monitoring settings.
▶About this challenge
Prepare a small API service for a production container while reviewing how the app is run and where its files live.
A container image should let the app read and run what it needs without relying on unnecessary privileges.
- What does this practice?
- It practices checking the runtime account and file permissions in an application container.
- When is it useful?
- It helps when reviewing the default runtime environment of a deployment image.