Package a simple Node.js application into a Docker image, run it locally, verify logs, and document the workflow like a real deployment task.
Understand Dockerfile basics, image builds, port mapping, container logs, and the full local packaging workflow.
Create or use a small Node.js app with a package.json and a basic HTTP endpoint.
Create a simple Node.js application
Make sure the app listens on a known port
Verify it works locally before containerizing
Write a Dockerfile and package the app into a reusable image.
Write a Dockerfile
Use a Node base image
Copy source files and install dependencies
Expose the application port
Build the image with docker build
Start the container and confirm the app is reachable from the host machine.
Run the container with port mapping
Check running containers with docker ps
Test the app in the browser or with curl
Read logs with docker logs
Write a short README and capture proof that the workflow works end to end.
Document build and run commands
Add verification steps
Capture a screenshot or terminal proof
Create a simple Node.js application.
Write a Dockerfile.
Build the image with docker build.
Run the container with port mapping.
Verify logs and test the app in browser.
docker images shows the built image
docker ps shows the running container
The app opens in the browser or responds to curl
docker logs shows application startup output
Working Dockerfile
README with build and run instructions
Screenshot or terminal proof of the running app
Shows that you understand container basics and can package an application for consistent local deployment and testing.
Using the wrong application port inside the container
Forgetting to publish the port with -p
Copying files in the wrong Dockerfile order
Missing dependencies because package files were not copied correctly
App binds only to localhost instead of 0.0.0.0
Push the image to Docker Hub or another registry
Add a GitHub Actions workflow to build automatically
Use docker-compose for local multi-service testing
Deploy the container to a VM or cloud service