Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions 2025/docker/task1_sol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
### Task 1: Introduction and Conceptual Understanding
1. **Write an Introduction:**
- In your `solution.md`, provide a brief explanation of Docker’s purpose in modern DevOps.
- Compare **Virtualization vs. Containerization** and explain why containerization is the preferred approach for microservices and CI/CD pipelines.


### Introduction to Docker

Docker is an OS‑level virtualization (or containerization) platform, which allows applications to share the host OS kernel instead of running a separate guest OS like in traditional virtualization. This design makes Docker containers lightweight, fast, and portable, while keeping them isolated from one another.

** Containers vs. virtualization **
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spacing in emphasis markers.

As per coding guidelines from static analysis, remove the spaces inside the emphasis markers for proper Markdown formatting.

🔎 Proposed fix
-** Containers vs. virtualization **
+**Containers vs. virtualization**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
** Containers vs. virtualization **
**Containers vs. virtualization**
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

11-11: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)


11-11: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)

🤖 Prompt for AI Agents
In 2025/docker/task1_sol.md around line 11, the emphasis markers contain extra
spaces ("** Containers vs. virtualization **"); remove the leading and trailing
spaces inside the bold markers so the heading becomes "**Containers vs.
virtualization**" to comply with Markdown formatting guidelines and static
analysis rules.

Containers are an abstraction that packages application code and dependencies together. Instances of the container can then be created, started, stopped, moved, or deleted using the Docker API or command-line interface (CLI). Containers can be connected to one or more networks, be attached to storage, or create new images based on their current states.

Containers differ from virtual machines, which use a software abstraction layer on top of computer hardware, allowing the hardware to be shared more efficiently in multiple instances that will run individual applications. Docker containers require fewer physical hardware resources than virtual machines, and they also offer faster startup times and lower overhead. This makes Docker ideal for high-velocity environments, where rapid software development cycles and scalability are crucial.

![alt text](image-1.png)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the referenced image exists
if [ -f "2025/docker/image-1.png" ]; then
  echo "Image found at 2025/docker/image-1.png"
else
  echo "ERROR: image-1.png not found at 2025/docker/image-1.png"
  echo "Searching for any png files in 2025/docker/ directory..."
  fd -e png . 2025/docker/ 2>/dev/null || echo "No files found or directory does not exist"
  echo ""
  echo "Checking if 2025/docker directory exists..."
  ls -la 2025/docker/ 2>/dev/null || echo "Directory 2025/docker/ does not exist"
fi

Repository: LondheShubham153/90DaysOfDevOps

Length of output: 558


🏁 Script executed:

cat -n 2025/docker/task1_sol.md

Repository: LondheShubham153/90DaysOfDevOps

Length of output: 2069


Missing referenced image file.

The documentation references image-1.png on line 16 but this file is not included in the repository. This will result in a broken image link.

Add the image file to 2025/docker/image-1.png or update the reference to point to an existing image location (such as task2/image.png if that's the intended image).

🤖 Prompt for AI Agents
In 2025/docker/task1_sol.md around line 16, the referenced image file
image-1.png is missing; either add the actual image file to the repo at
2025/docker/image-1.png and commit it, or update the markdown reference to point
to an existing image path (for example replace image-1.png with task2/image.png
or the correct relative path) so the link resolves; ensure the filename and path
exactly match the committed file and update any casing if necessary.


Containerization is the preferred approach for microservices and CI/CD pipelines because it offers crucial benefits such as isolation, consistency, and portability. These benefits streamline development, testing, and deployment, making the entire process faster and more reliable.
10 changes: 10 additions & 0 deletions 2025/docker/task2/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello, World!'

if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)

Binary file added 2025/docker/task2/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions 2025/docker/task2/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flask
4 changes: 4 additions & 0 deletions 2025/docker/task2/task2_sol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Task 2: Create a Dockerfile for a Sample Project
1. **Select or Create a Sample Application:**
- Choose a simple application (for example, a basic Node.js, Python, or Java app that prints “Hello, Docker!” or serves a simple web page).
Comment on lines +1 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Task 2 solution documentation is incomplete.

This file only contains the header and first bullet point but lacks the actual solution content. For a complete educational resource, it should include:

  • Step-by-step Dockerfile creation
  • Explanation of Dockerfile directives (FROM, WORKDIR, COPY, RUN, EXPOSE, CMD)
  • Docker build command with explanation
  • Docker run command with port mapping
  • Sample Dockerfile for the Flask app in this directory

Would you like me to help generate complete solution documentation for this task?

🔎 Example content that should be added
### Task 2: Create a Dockerfile for a Sample Project

1. **Select or Create a Sample Application:**  
   - Choose a simple application (for example, a basic Node.js, Python, or Java app that prints "Hello, Docker!" or serves a simple web page).

2. **Create a Dockerfile:**
   - In the same directory as your application, create a file named `Dockerfile`
   
   ```dockerfile
   FROM python:3.11-slim
   WORKDIR /app
   COPY requirements.txt .
   RUN pip install --no-cache-dir -r requirements.txt
   COPY app.py .
   EXPOSE 5000
   CMD ["python", "app.py"]
  1. Build the Docker Image:

    docker build -t flask-hello-world .
  2. Run the Container:

    docker run -p 5000:5000 flask-hello-world
  3. Test the Application:

    • Open a browser and navigate to http://localhost:5000
    • You should see "Hello, World!" displayed
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

In 2025/docker/task2/task2_sol.md around lines 1 to 3, the Task 2 solution is
incomplete (only header and first bullet); update the file to provide a full
step‑by‑step solution: add clear instructions for creating a Dockerfile, explain
each Dockerfile directive (FROM, WORKDIR, COPY, RUN, EXPOSE, CMD), include the
docker build and docker run commands with port mapping and brief explanations,
provide a sample Dockerfile tailored to the Flask app in this directory and
mention requirements.txt handling, and add a short test/verification step
describing how to access the app in a browser.


</details>

<!-- fingerprinting:phantom:poseidon:puma -->

<!-- This is an auto-generated comment by CodeRabbit -->


Empty file added 2025/linux/task1_sol
Empty file.
19 changes: 19 additions & 0 deletions 2025/linux/task1_sol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
Task:
Create a user devops_user and add them to a group devops_team.

# useradd devops_user
# groupadd devops_team
# gpasswd -a devops_user devops_team

Set a password and grant sudo access.
# sudo passwd devops_user
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Missing sudo access grant commands.

The task mentions granting sudo access, but the actual implementation is missing. The passwd command only sets the password; it doesn't grant sudo privileges.

🔎 Proposed addition

Add the following after setting the password:

# Grant sudo access by adding user to sudo group
sudo usermod -aG sudo devops_user

# OR add specific sudoers entry
echo "devops_user ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/devops_user
🤖 Prompt for AI Agents
In 2025/linux/task1_sol.md around lines 9 to 10, the script sets a password but
does not actually grant sudo privileges to devops_user; add a step after the
passwd command to grant sudo access by either adding the user to the sudo group
(usermod -aG sudo devops_user) or creating a dedicated sudoers drop-in (echo
"devops_user ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/devops_user) and
ensure the drop-in has correct permissions (0440).


Restrict SSH login for certain users in /etc/ssh/sshd_config.
# cd /etc/ssh
# vi sshd_config
# add a keyword AllowAccess
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Incorrect SSH configuration keyword.

The keyword AllowAccess does not exist in SSH configuration. The correct keywords are AllowUsers or DenyUsers to restrict SSH login for specific users.

Example correct usage:

AllowUsers devops_user admin

or

DenyUsers guest test
🤖 Prompt for AI Agents
In 2025/linux/task1_sol.md around line 15, the SSH config uses a non-existent
keyword "AllowAccess"; replace it with the correct SSH directive ("AllowUsers"
to permit specific logins or "DenyUsers" to block specific logins) and update
the line to list the appropriate usernames or patterns following the chosen
keyword so the SSH daemon recognizes and enforces the restriction.

*/
Comment on lines +1 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix incorrect comment syntax for Markdown.

This file uses C-style comment syntax (/* */) which is not appropriate for Markdown files. Use HTML comments (<!-- -->) or remove the comment delimiters entirely since this appears to be documentation content.

🔎 Proposed fix
-/*
 Task:
 Create a user devops_user and add them to a group devops_team.
 
 # useradd devops_user 
 # groupadd devops_team
 # gpasswd -a devops_user devops_team
 
 Set a password and grant sudo access.
 # sudo passwd devops_user
 
 Restrict SSH login for certain users in /etc/ssh/sshd_config.
 # cd /etc/ssh
 # vi sshd_config
 # add a keyword AllowAccess
-*/
+## Task:
+Create a user devops_user and add them to a group devops_team.
+
+```bash
+# useradd devops_user 
+# groupadd devops_team
+# gpasswd -a devops_user devops_team
+```
+
+Set a password and grant sudo access.
+```bash
+# sudo passwd devops_user
+```
+
+Restrict SSH login for certain users in /etc/ssh/sshd_config.
+```bash
+# cd /etc/ssh
+# vi sshd_config
+# add a keyword AllowUsers or DenyUsers
+```
🤖 Prompt for AI Agents
In 2025/linux/task1_sol.md lines 1-16, the file incorrectly uses C-style block
comments (/* ... */) for Markdown content; remove the C comment delimiters and
convert the embedded commands and notes into proper Markdown: use fenced code
blocks with language markers (```bash) for command examples, plain paragraphs
for explanatory text, and correct the SSH directive name (e.g., AllowUsers or
DenyUsers) in the instructions; ensure no leading plus signs remain and that
formatting is valid Markdown.




Empty file added 2025/networking/solution
Empty file.