I have a server with Plesk 18.0.58#2 on Debian 12. The Extension Docker in version 1.8.7-550 is installed and runs fine so far.
I tried to load a Python image into Docker. Unfortunately, the image does not start. Plesk support has looked at my server and cannot find any errors on the part of Plesk or the OS (Debian 12). Other images such as Redis work without any problems. All Python versions and their alternatives cannot be started. The log shows on all Python versions:
PHP Warning: Undefined array key "limit"; File: /opt/psa/admin/plib/modules/docker/controllers/IndexController.php, Line: 170
Here is the answer from Plesk Support:
Allow me to share the investigation results.
I tried to start the mentioned container within the terminal, without Plesk, and the result was the same.
I have also tested this same container with the clean Debian 12 server with no Plesk installed, yet the result was the same, the container was stopped immediately with “Exited” status.
Given that, and the fact that other containers are working correctly, it is safe to say that there is no any conflicts with the Plesk. At this point, I would recommend checking with the official page Docker and check for any other requirements.
Please note, that Plesk uses Docker as is, meaning there is no intervene to the Docker processes or service from the Plesk side.
Let me know if any additional clarifications from the Plesk side would be needed.
Technical Support Engineer
I hope that my information is sufficient to analyze the problem. If further data is required, I will be happy to provide it.
Many thanks in advance and best regards
I wrote a long post and realized you just checked the Plesk error log, but didn’t know that the error is not related to the container starting issue.
The undefined key “
limit” could mean that the memory limit was not defined for the Python container and it was for others. Here is a screenshot that shows the “Memory limit” field
So that’s okay. Plesk developers should and could fix that but that shouldn’t cause bigger problems.
So yes, the plesk support recommended checking the Python image description and it is exactly what you should do. A python image is just a base image. You could start it interactively and play with the shell inside but if won’t run in the background.
Thank you for your feedback. Did you read that the Python image does not work on a fresh Docker installation without Plesk?
Have a look at the screenshots. It seems that memory is not allocated at all although I have not limited it. But it can’t actually be due to too little memory, the server has plenty of it. However, other images that I have tried work. But Python and its alternatives do not.
Sorry for so many posts. I´m not allowed to post more than one attachment in one post.
And here is another image wich runs fine.
I’m not sure why you ask it, but no, I didn’t read it. Did you wrote that and I missed it?
Even if it is true, share the expectation and how you are starting the container, because as I wrote in my previous message, there is nothing to start in the container. Except of course the shell, which will start and stop immediately. It is not a virtual machine. You have to set a process to run in the foreground. I shell will not do that, unless you ask for a TTY in the container. It could be good for testinf, but not how a pthon image should be used.
Forget the memory. It had nothing to do with the not starting container. If you meant that you didn’t see allocated memory in the “Ressourcen” block, that must be because that shows the used memory which is nothing when the container is stopped. Of course the memcached container doesn’t stop, when it has a command to run and keep the container alive, since memcached itself works as a server, but Python is just a programming language.
Thanks for your answer. As I understand, I need to put a command into the console to start a script. But I can´t use the console. There is no command possible because it is not accessible.
So how can I use the console even if it is not starting? And when I need to access the Python Image via ssh, what can people do who cant access the server with ssh. I looked at this docs: docs/python at master · docker-library/docs · GitHub but I´m not shure how to use it without access to ssh.
Or do I need to start the script as a value in the options of the container?
I´m not a coder or familiar with those things, sorry for asking such questions.
I feel you need to understand better what a container is. It is not something that you can use just by installing a GUI application and and rely on old ways. In this specific case, you need to learn about how you can run commands in containers. I wrote a blogpost about it.
I alos recommend learning about othe concepts as well. Just some quick notes:
You run a container, not an image. You access a container, not an image. But you don’t use SSH to access a container (usually)
Recommended links to learn the basics and concepts:
The last link is (currently) about Docker Desktop which is Docker CE in a virtual machine whith a GUI.