oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
314 stars 517 forks source link

Proposal: Dockerization of Oppia Android Codebase for Enhanced Development Experience #5264

Open Cyclotron17 opened 10 months ago

Cyclotron17 commented 10 months ago

Subject: Request to Dockerize Oppia Android Codebase for Improved Local Setup

Hi Oppia Android Team,

I hope this message finds you well. I am writing to bring attention to the challenges faced by developers when setting up the Oppia Android repository in their local systems. It has come to our attention that the current setup process is not as seamless as desired, leading to difficulties for new contributors and even experienced developers.

To address these issues and enhance the overall development experience, I propose that we Dockerize the Oppia Android codebase. Dockerization can offer several benefits, including:

Consistent Development Environment: Docker provides a standardized environment across different systems, reducing the likelihood of setup issues related to dependencies and configurations.

Simplified Onboarding: New contributors can easily get started with the project by pulling a pre-configured Docker image, eliminating the need to troubleshoot individual setup problems.

Isolation of Dependencies: Docker containers encapsulate project dependencies, ensuring that they do not interfere with the host system and preventing conflicts with other projects.

Easy Reproducibility: Developers can easily share Docker images to ensure that everyone is working in the same environment, reducing the "It works on my machine" problem.

Given the potential advantages, I would like to propose creating a Dockerfile and Docker Compose configuration for the Oppia Android repository. This would allow developers to spin up a containerized environment effortlessly, streamlining the setup process.

I understand that there may be considerations and potential challenges in implementing this change. I encourage the team to discuss and provide insights on the feasibility and potential impact of Dockerizing the Oppia Android codebase. Additionally, any guidance on best practices for Dockerizing Android projects would be highly appreciated.

Let's collaborate to enhance the development experience and make Oppia Android more accessible to contributors. I look forward to your feedback and discussion on this matter.

Best regards,

Sambhrant Tiwari Username-Cyclotron17, sambhrantt@gmail.com

Describe the solution you'd like

Proposed Solution: Dockerization of Oppia Android Codebase Overview: Dockerizing the Oppia Android codebase involves creating Dockerfiles and Docker Compose configurations to encapsulate the project's dependencies and streamline the development setup process.

Steps: Create Dockerfile:

Develop a Dockerfile specifying the base image, Android SDK, required dependencies, and build tools. Configure the Dockerfile to clone the Oppia Android repository. Dockerfile

Dockerfile

FROM openjdk:11

Install Android SDK

...

Install Oppia Android dependencies

...

Clone Oppia Android repository

...

Configure Docker Compose:

Develop a docker-compose.yml file to define the services, volumes, and networking required for the Oppia Android development environment. In yaml:

docker-compose.yml

version: '3' services: oppia-android: build: context: . volumes:

Provide instructions for developers to build the Docker image using the Dockerfile. In bash

docker build -t oppia-android-dev . Run Docker Container:

Instruct developers on how to run the Docker container for Oppia Android development. In bash:

docker-compose up -d

Expected Benefits: Consistent Development Environment:

Ensure that all developers are working in a standardized environment, reducing setup discrepancies. Simplified Onboarding:

New contributors can quickly get started by pulling the pre-configured Docker image, minimizing setup challenges. Isolation of Dependencies:

Docker containers encapsulate project dependencies, preventing conflicts with the host system. Easy Reproducibility:

Facilitate easy sharing of Docker images to maintain consistency across development environments.

Describe alternatives you've considered

No response

Additional context

No response

adhiamboperes commented 10 months ago

Hi @Cyclotron17, thanks for raising this issue. If you would like to get started on discussion of a proposal, I would suggest that you put up a design doc to facilitate this. Please see: https://github.com/oppia/oppia-android/wiki/Writing-design-docs for how to get started with design docs.