Coding Phase: Pseudo Code / Flow Chart / Algorithm
Step-by-Step Dockerization Script
1. Create a simple [Link] app
mkdir my-app && cd my-app
echo 'const http = require("http");
const PORT = [Link] || 3000;
const server = [Link]((req, res) => {
[Link]("Hello from Dockerized [Link] App!");
});
[Link](PORT, () => {
[Link](Server running on port ${PORT});
});' > [Link]
echo '{
"name": "my-app",
"version": "1.0.0",
"main": "[Link]",
"scripts": { "start": "node [Link]" }
}' > [Link]
2. Create a Dockerfile
echo 'FROM node:18
WORKDIR /app
COPY . .
RUN npm install
EXPOSE 3000
CMD ["npm", "start"]' > Dockerfile
Testing Phase: Compilation of Code (error detection)
Implementation Phase: Final Output (no error)
1. Create your application code, e.g., a simple [Link] for [Link].
2. Add a [Link] to manage dependencies and define a start script.
3. Create a Dockerfile with instructions to set up the container environment.
4. Use FROM to choose a base image, like node:18 for [Link].
5. COPY source files, install dependencies, and expose necessary ports.
6. Build the Docker image using docker build -t my-app ..
7. Run the container with docker run -p 3000:3000 my-app.
Rubrics
Concept 10
Planning and Execution/ 10
Practical Simulation/ Programming
Result and Interpretation 10
Record of Applied and Action Learning 10
Viva 10
Total 50
Signature of the Student:
Signature of the Faculty: