Coding Period 2: Week 6

Ritik Malik
3 min readJul 23, 2021

Finally! We had our first evaluations and we passed with flying colors! I would like to thank Yash Prakash for collaborating on MARS and to all the mentors and the amazing CHAOSS community for their constant support and guidance.

Now begins the week 6 of our 2nd coding period —

Week 6 started with our weekly mentor mentee meeting. Initially we had our demo for Docker, since our MARS image was up and running. The demo was successful and we were able to generate the PDF. Mentors were satisfied except 1 small thing — the automation script was meant to be run as root user.

Here I completely agreed with them and it’s a reasonable concern, running a shell script with root permission is NOT a safe idea, specially when you are downloading it from internet. I’ve thought before that we maybe encounter this issue.

So our first and the foremost task was to run our Docker image for MARS as a non root user. Aaaaaaand it was quite a tedious job than we imagined! We had to take a deep dive into the Docker documentation, Stackoverflow, and many other resources.

Firstly we had to run Docker commands as rootless user, so we added the our user to the Docker group. Now we made many attempts to run it but they all failed with permission errors either while running the scripts in Docker or creating new files in the environment. Finally we came up with a new approach —

Create a new user in Dockerfile

Extract user ID and group ID from current user

This new user will have the user ID and group ID as your current user

Switch to the new user in Docker

Use ‘gosu’ binary to change privileges

Now we can copy and run MARS scripts with bind mount

All the files that are created (logs, PDF, etc) will have the same permission as Docker user, which in-turn has the same permission as your current user!

So finally we were able to solve the rootless docker issues. We believe in Stackoverflow supremacy.

This was the exact feeling, ngl

The next step was to work on the Documentation for the same. We made a new README as an installation guide for MARS. It was an easy task and is almost finalized with a few tweaks left.

The Documentation can be found here.

Apart from helping in the above tasks, Yash was also working on the translations repo. He attended the Asia Pacific meetings and opened issues and PRs for regarding the translations guidelines.

Next week, we will continue standardization for working groups (almost complete) once the migration of website is over. We’ll also work on the translation repo and make MARS available for user testing and reviews for the English release version.

just an appreciation for Stackoverflow :)

--

--