Yunohost 2.4 on Docker (comeback ?)!

I have see this bad news … : https://yunohost.org/#/docker_en

But, what do you think of this Yunohost 2.4 docker image ? https://hub.docker.com/r/domainelibre/

Have a good day :slight_smile:

1 Like

Hi,

Last time I tried docker yunohost image with --privileged it broke my system. So I prefer to warn that this option could be dangerous.

Note that with --privileged, your firewall host rules is changed…

Concerning our decision to remove the old tutorial for YunoHost Docker. Four YunoHost developers tried to build and run a ynh2.4 docker image. But, they did not manage to make it work. We succeed to have ynh 2.4 docker running but with very poor methods and with several security and stability issues.

The main issue is that YunoHost 2.4 uses Debian Jessie which uses systemd, but systemd is not supported by Docker. In addition, Docker is design to run one service by a container and YunoHost is meant to run multiple services. Finally, YunoHost changes iptables rules but Docker iptables uses iptables from the host.

That is the reason why we wanted to remove YunoHost Docker support. Consequently, we remove from the infra docker (yunohost demo used docker) and from our ynh-dev development tool.

Hello @aymhce,

I’m sorry, I didn’t saw your PR when I’ve modified the documentations pages regarding docker :confused:

I think that ljf correctly explained our choice for now regarding docker but it’s not impossible that we change it in the future.

Regarding your docker, I couldn’t find the DockerFile anywhere, could you put it online and/or link it please?

Have a nice day and thanks for what you are doing :slight_smile:

Bonjour :slight_smile:

Pour les francophones, j’ai fait une réponse sur les raisons de la création d’une image docker avec systemd Update install for Docker by aymhce · Pull Request #10 · YunoHost-Apps/wordpress_ynh · GitHub :

En fait, mon besoin à la base est de faire tourner Yunohost sur Raspberry Pi 2 et je suis un grand adepte de docker pour plusieurs raisons (simplicité, rapidité/légèreté, gestion et versionning des images, vaste communauté … ). A l’époque de Yunohost 2.0, je m’étais créé une image docker ARM en m’inspirant de l’image officiel de Yunohost.

Depuis le passage à systemd, le Dockerfile de l’image officielle ne pouvait plus fonctionner, il faut passer par un “docker run debian”, puis un “docker commit” … Et en cherchant un peu, j’ai trouvé une méthode pour lancer systemd en tand que process docker (comme sur http://developers.redhat.com/blog/2014/05/05/running-systemd-within-docker-container/).

Pour répondre à ta question, cette solution est stable pour Yunohost (hormis iptables) mais n’est pas officiellement décrite par Docker (car contraire à leur politique single process).
Juste, il reste que l’utilisation du --privileged est à affiner pour plus de sécurité (il faut que je bosse dessus).

Ensuite, pour les personnes intéressées dans la communauté, j’ai rendu mon image ARM public sur Docker Hub et crée une image AMD64 (car plus souvent utilisé). Ces images publiques ont pour vocation à être utilisées dans un contexte de développement (test d’application YNH par ex) et d’être testées pour avoir d’éventuels retours sur les bugs. Après, je ne recommande pas (encore) une utilisation en contexte de production (même si pour moi, c’est déjà le cas :slight_smile: ).

Doc artisanale pour la construction de l’image avec Yunoshost https://github.com/domainelibre/YunohostDockerImage/blob/master/README.md

Sorry for English , I will do a translation later (or please use Google Translate :confused: )

This is excellent news, thanks for sharing this!
Regarding the security issues, I don’t see the problems if the user is made aware of this. It is like installing it on bare metal then.

Cheers

Salut @aymhce ,

Hier c’était la réunion mensuelle YunoHost, nous avons constaté que nous n’avions pas publié le résultat des discussions sur ta contribution. Donc, je m’en charge:

Avant tout merci pour ta contribution, elle est chouette, c’est super :slight_smile:

Les contributeurs réguliers sont d’accord pour mettre en avant cette contribution sans l’officialiser et en indiquant qu’elle est expérimentale, à la condition que l’image puisse être construite sur l’infra de YunoHost à l’aide de script afin que plusieurs devs puissent avoir la main dessus. En effet, nous ne pouvons pas distribuer des boites noires uploadées par une seule personne.

Dans un second temps, cette contribution pourrait progressivement être officialisée, notamment si les retours sont positifs et si un ou plusieurs contributeurs sont prêt à se charger de la maintenance. Ce contributeur peut très bien être toi (si tu as l’envie et le temps :slight_smile: ) .

Nous sommes désolé pour le délais de réponse, nous sommes justement en train de discuter de la façon d’intégrer les contributions et les nouveaux contributeurs. Une réunion est prévue le 22 octobre à ce sujet cf http://pv.yunohost.org/meeting/75-yunohost-10-2016/


Hi @aymhce,

Yesterday it was the yunohost meeting, we have noticed we hadn’t published the result of our discussion about your contribution. So I do:

Firstly, thankyou very much for your contribution, it 's cool :slight_smile:

Regular contributors agree with the highlighting of your contribution, without officialize it and by indicating it’s experimental, with one condition: several devs should be able to build the image by automating the build on the YunoHost Infra. Indeed, we can’t distribute a black box uploaded by only one person.

Secondly, this contribution could be officialized progressively, if feedbacks are ok and if one or several contributors are ready to maintain the image. This contributor could be you (if you want and if you have the time :slight_smile: ).

We appologize about the time to answer, we are discussing the way we integrate contribution and new contributors. A meeting is planned the 22nd October about that: http://pv.yunohost.org/meeting/75-yunohost-10-2016/

Bonjour, et merci pour la reconnaissance :slight_smile:

Pas de problème pour mettre en avant les images docker et de les construire depuis un serveur yunohost. Je manque un peu de temps, mais j’ai pour projet de créer une image supplémentaire 32bits et si possible d’affiner le mode --privileged pour plus de sécurité.

Sinon, j’ai problème sur Redmine, je ne peux pas accèder à l’issue 534 dont tu m’avais parlé depuis GitHub (https://dev.yunohost.org/issues/534), j’ai une 403…

Les images ont été mises à jour avec Yunohost 2.5 :

1 Like