Skip to content

Refactor docker file and added docker.txt as guideline#6

Open
lichee03 wants to merge 1 commit intodevfrom
assignment1_ChaiLiChee
Open

Refactor docker file and added docker.txt as guideline#6
lichee03 wants to merge 1 commit intodevfrom
assignment1_ChaiLiChee

Conversation

@lichee03
Copy link
Collaborator

@lichee03 lichee03 commented Dec 1, 2025

  1. The Addressed Issue:
    The existing Docker development environment configuration, primarily defined in Dockerfile.dev, presented two key issues:
  • The system package installation is consolidated into one dense, un-commented RUN block, which hinders readability and makes it difficult for new contributors to understand the purpose of each dependency.

  • There is no dedicated runbook or guide that clearly outlines the necessary steps required to successfully set up, run, and start development inside the container, leading to setup confusion and friction for first-time users.

  1. What I Have Engineered:
  • Refactored Dockerfile.dev: Added detailed comments to major sections (System Packages, Python Environment Setup, Dependency Installation) to clearly explain the purpose and flow of the environment setup.

  • Created Docker.txt: A new guidance file was created with step-by-step instructions for building the Docker image, running the container, and testing the environment, including explanations of key commands and recommended run parameters.

  • Improved Configuration Logic: Reorganized some commands within Dockerfile.dev to ensure better handling of common issues like user permissions and necessary path configurations for a smoother developer experience.

  1. Reengineering Approach Used:
    The strategy employed was Refactoring for Usability and Maintainability, focusing on documentation and clarity:
  • Commentary and Code Reorganization: The Dockerfile.dev was analyzed, and detailed comments were injected to transform the configuration from a monolithic script into a well-documented, sectioned build process.

  • External Guidance Implementation: The creation of the Docker.txt file implemented a crucial piece of missing documentation. This strategy abstracts the execution logic away from the Dockerfile itself, providing a single, clear source of truth for developer onboarding.

  • Modular Configuration: The Docker configuration was made more modular by ensuring setup steps were logically grouped, simplifying future updates and maintenance.

  1. Impact of Changes:
    The positive impacts from this reengineering process are:
  • Simplified Onboarding Process: New contributors now have a clear, documented path to setting up the environment, reducing initial setup time and minimizing potential errors.

  • Enhanced Understanding and Developer Experience: The clear explanations in both the Dockerfile.dev and the Docker.txt provide developers with a deeper understanding of the environment, leading to a better overall developer experience.

  • Improved Maintainability: The refactored Dockerfile.dev is significantly easier to audit, debug, and update when system or Python dependencies change in the future.

@lichee03 lichee03 assigned lichee03 and suhadaudd11 and unassigned lichee03 Dec 1, 2025
@lichee03 lichee03 changed the title SME Assignment 1 Refactor docker file and added docker.txt as guideline Dec 1, 2025
@lichee03 lichee03 requested a review from suhadaudd11 December 31, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants