Skip to content

Interview Task: Fix-519 docker image cleanup #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

TeyimPila
Copy link

Interview Task Report https://github.com/nextcloud/app_api/issues/519

From my understanding, the app_api codebase is mainly a devOps tool used for managing other applications

I've struggled with getting the app up and running. I followed the documentation here: https://docs.nextcloud.com/server/latest/developer_manual/exapp_development/index.html

While following the documentation, I couldn't find the script that this command executes: ./occ app:enable --force app_api Perhaps this is in the server codebase instead? if that's the case, it isn't clear in this documentation

I However, did manage to get the environment up and running at http://nextcloud.local using the docker-socket-proxy repository.

Solution

It took my quite some time to understand the codebase, but I managed to have a fair idea of it

  • In the lib folder, I introduced the following method in...

  • /lib/DeployActions/DockerActions.php The aim is to call docker's /images/prune API

Next, I implemented the following

  • lib/BackgroundJob/DockerImageCleanupJob.php

With these in place, I am struggling to understand how they tie into the entire nextcloud ecosystem and how to actually debug the code to see it in action.

this is because with the development environment running, and after I login, I couldn't access http://nextcloud.local/index.php/settings/admin/app_api due to permission issues.

With this, exploration, I need help with some more concrete walkthrough of the codebases and how they work together and to understand how to properly introduce my changes and test them.

@TeyimPila TeyimPila marked this pull request as draft May 12, 2025 12:30
@oleksandr-nc
Copy link
Contributor

Good day.

I couldn't find the script that this command executes: ./occ app:enable --force app_api

It is from the server repo, here are the docs for it.
You do not need to debug or change this occ command cause it is widely used and works.

With these in place, I am struggling to understand how they tie into the entire nextcloud ecosystem and how to actually debug the code to see it in action.

this is because with the development environment running, and after I login, I couldn't access http://nextcloud.local/index.php/settings/admin/app_api due to permission issues.

What permissions errors do you have accessing this?

We usually use this perfect repo for easy installing dev setups.

It has documentation how to enable debugging, and it is possible to debug background jobs.

@TeyimPila
Copy link
Author

Good day.

I couldn't find the script that this command executes: ./occ app:enable --force app_api

It is from the server repo, here are the docs for it. You do not need to debug or change this occ command cause it is widely used and works.

With these in place, I am struggling to understand how they tie into the entire nextcloud ecosystem and how to actually debug the code to see it in action.
this is because with the development environment running, and after I login, I couldn't access http://nextcloud.local/index.php/settings/admin/app_api due to permission issues.

What permissions errors do you have accessing this?

We usually use this perfect repo for easy installing dev setups.

It has documentation how to enable debugging, and it is possible to debug background jobs.

Thank you for the info. I will go over it again.

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