Over the last year, I was exploring what I could do with a flask server. GPT & I by inquiry have come close to a poorly designed but half working model.
It won’t let “docker run” function due to not knowing how the grpc is used.
If one were to flesh out the flask based dockerd mimick, what functionality & flexibility would this give dockerd for something like cellphones & smart watches?
I ask because I am trying to setup a AI that can run on any hardware.
Shouldn’t we ask it from you? I’m not against discussing these kind of topics, but I’m not sure what you want to solve. Maybe it is just because I don’t see what AI can solve. I don’t work with AI (besides using ChatGPT sometimes) only work with people working with and on AI, but to support everything that Docker can do wouldn’t you need to implement everything that Docker can do? I understand that some basic features can be emulated by using an AI, like giving you an example output of docker inspect or running some linux bash commands like “ls” or “df -h” or even running a simple bash container that gives you a prompt, but what about more complex goals like running a completely unknown application.
I think, if you want to start a more active discussion, you will need to give a better, longer explanation about what you want to achieve and what you want to ask from the community,
Well, it would take some work to do, and I would not be opposed to developing such. AI in my book includes neural emulation (similar modeling to human heads, to sum up).
What I was doing was figuring out what dockerd does so I could get docker to run on a phone. The AI is not attached to the flask program that emulated dockerd functionality.
So, basically, I created a flask server that docker can as a binary try to use as if it were dockerd. To answer your question of emulating all things dockerd can do, yes but i’d need to look into docker dev’s documentation more.
I mean, it sort of works. If I fleshed it out more from that point, it would annoy me to study the documentation of dockerd at the assembly level, etc.
I do have ways to setup the python interpreter to intercept interrupts of even dockerd. Honestly, I made it for the purpose of emulating dockerd on android. But needed ChatGPT to wire-guided missile most of the template til something sort of worked.
Realistically, if they have time to check it out, they’ll find a puzzle piece from golang that looks fairly similar.
So if now I understand it correctly, it would not really be an emulation. You would like to implement dockerd in flask. I have no idea how android or any mobile OS support containers, but dockerd is just a daemon which for example Podman doesn’t have. dockerd also uses containerd as container runtime and there are lower level container runtimes like runc. Not to mention the shim process between them. So I think your biggest challange would not be implementing dockerd but running containers on Android for example. I once tried to install docker on a mobile phone. I don’t remember how. I think I tried using Termux but I don’t remember what exactly I did, except id didn’t work. So if you implement something like Docker on a mobile phone, that could be a good achivement, but I just played with the idea when I wanted to know the limits of my new phone. I don’t think I would actually run Docker on my phone often, but it could be interesting when you just want to quickly try something simple and all you have is your phone. On the other hand, I could try it on my VPS if I have internet. If not, I could not pull new images.
So it is an interesting idea at least. Even if you don’t succeed, you can learn a lot on the way.
That is correct. So, That is something I had looked into userland.apk with a ubuntu image to sort of solve. But even then it depended on using kmod & libkmod2 on a rooted android. Otherwise the user policy locks out access to /sys at some selinux privilege level.
What I’ve learned is that said implementation by hand would take a bit to work around. containerd & runc needed specific config that I didn’t have time to explore. I can’t see why it would not be do-able with some clever thinking applied.
Honestly, I would be willing to work for the docker team so it runs on android and IOS via python3. I’d have no problem with developing it further at that point.
correct. I specifically hate golang, for the simple and complex hoop jumping it is good for. I suspect the initial developers chose golang because it likely was simpler to tap dance around that problem space. So, if they wanna hire me to develop it, I’d gladly review the source code to figure out the 1:1 python code for it to be 99% python. It’d be a headache and a half, but worth it for someone as silly as my dad.