juanluisbaptiste / docker-brew-mageia

Scripts and files to create Mageia official docker base images.
GNU General Public License v2.0
10 stars 12 forks source link

Non official images, not official. #30

Open DavidWHodgins opened 2 years ago

DavidWHodgins commented 2 years ago

As previously requested please make it clear these are images created by one person. They are not official Mageia images. They have not passed qa testing. They have not been approved by council, which in the past made the choice that while we provided docker, we do not provide docker images of Mageia.

tianon commented 2 years ago

@DavidWHodgins I'm not the maintainer on this repository, but I'm a maintainer of the "official images" program it's part of, and I want to express apologies that this image has caused confusion! :bow: :heart:

In the interest of helping here as much as I can, what do you think about starting with a change to the "Maintained by:" text on https://hub.docker.com/_/mageia as a first pass? Is there something more clear we can change that to? ("The Mageia Community" or "Mageia Community Members" perhaps? Would you/the council rather see something like "Juan Luis Baptiste, a Mageia Community Member" instead?)

Out of curiosity (and in case someone in the community is paying attention here and has cycles to work on something!), is there anything that could be done for making something more official that could be blessed by the council? Are there technical challenges blocking that which could use some help to overcome? (Not looking for any specific answer here, to be clear; just trying to gauge and make sure it's clear where/whether there's something someone could contribute to help :heart:)

DavidWHodgins commented 2 years ago

On Wed, 13 Jul 2022 16:42:49 -0400, Tianon Gravi @.***> wrote:

@DavidWHodgins I'm not the maintainer on this repository, but I'm a maintainer of the "official images" program it's part of, and I want to express apologies that this image has caused confusion! :bow: :heart:

In the interest of helping here as much as I can, what do you think about starting with a change to the "Maintained by:" text on https://hub.docker.com/_/mageia as a first pass? Is there something more clear we can change that to? ("The Mageia Community" or "Mageia Community Members" perhaps? Would you/the council rather see something like "Juan Luis Baptiste, a Mageia Community Member" instead?)

Out of curiosity (and in case someone in the community is paying attention here and has cycles to work on something!), is there anything that could be done for making something more official that could be blessed by the council? Are there technical challenges blocking that which could use some help to overcome? (Not looking for any specific answer here, to be clear; just trying to gauge and make sure it's clear where/whether there's something someone could contribute to help :heart:)

I've opened up a discussion on the topic with the Mageia Board of directors, of which I am a member. I'm also a member of the council and the leader of the Mageia Quality Assurance team.

While we do have the docker packages available to our users and are fine with the distribution of scripts to enable individuals to build their own images using Mageia packages, the council chose not to distribute docker images or any other container format images due to the increase in workload it would add, as every update of an rpm package that's included in a container would then also require rebuilding and testing the container(s).

I've now been informed one of the other Board/Council members is among the people involved in creating the docker image, having chosen to ignore the prior council decision.

Discussions are currently ongoing on how to handle the situation.

Whether that's going to result in the image being relabeled as unofficial, staying as is but properly maintained (It's currently missing security updates), or being removed, I don't know yet.

Regards, Dave Hodgins

juanluisbaptiste commented 2 years ago

Hi @DavidWHodgins,

As previously requested please make it clear these are images created by one person. They are not official Mageia images. They have not passed qa testing. They have not been approved by council, which in the past made the choice that while we provided docker, we do not provide docker images of Mageia.

Could you point us to the discussion where this decision was taken by the council? I have been maintaining these images with the help from @Conan-Kudo since 2014, and in all this time, this is the first time I hear about this complaint from the council. Last discussion I remember about the docker images on the dev mailing list was last year when I announced the new mageia 8 images, and some devs raised concerns about the images not being built and signed on mageia own infrastructure and I explained to them that technically it was not possible because the docker official images are built by the docker team from the sources from this repo, and the discussion ended after that, apparently everyone was ok with the current process.

@tianon as you are part of the team that maintains the official docker images for multiple of other linux distros like, for example fedora, could ou explain us how the manage the build process of the images and QA of them ? do the do things differently from us ?

@Conan-Kudo do you have any thoughts on this ?

DavidWHodgins commented 2 years ago

On Wed, 13 Jul 2022 16:42:49 -0400, Tianon Gravi @.***> wrote:

@DavidWHodgins I'm not the maintainer on this repository, but I'm a maintainer of the "official images" program it's part of, and I want to express apologies that this image has caused confusion! :bow: :heart:

In the interest of helping here as much as I can, what do you think about starting with a change to the "Maintained by:" text on https://hub.docker.com/_/mageia as a first pass? Is there something more clear we can change that to? ("The Mageia Community" or "Mageia Community Members" perhaps? Would you/the council rather see something like "Juan Luis Baptiste, a Mageia Community Member" instead?)

Out of curiosity (and in case someone in the community is paying attention here and has cycles to work on something!), is there anything that could be done for making something more official that could be blessed by the council? Are there technical challenges blocking that which could use some help to overcome? (Not looking for any specific answer here, to be clear; just trying to gauge and make sure it's clear where/whether there's something someone could contribute to help :heart:)

From the Board discussion, I found out another Board/Council member (Neal Gompa) is also involved.

Unlike Juan who is no longer contributing to Mageia, Neal is active.

As such, it goes from being a possible legal or discipline issue, which would be handled by the board, to a procedural issue which falls within the purview of the Mageia council (made up of the leaders from each of the teams involved in the creation of Mageia).

I've called for a formal vote on the Mageia council mailing list to either start maintaining the image or removing it. From the initial discussions there, Neal was unaware the council had voted against distributing docker images, as that vote occurred before he started with Mageia.

The reason I personally am against the whole concept of docker images, is that there is large scale duplication of packages in many images. Every time there is a security or bugfix update for one of the packages every image that includes it should be rebuilt with the update included.

In this case, the Mageia docker image was created in April 2021. There have been many security updates since then, none of which are currently included.

Regards, Dave Hodgins

DavidWHodgins commented 2 years ago

I was wrong about the Mageia council voting against distributing docker images. Searching through my archives, there were some discussions, but never a vote. My memory failed me. My apologies

DavidWHodgins commented 2 years ago

On Wed, 13 Jul 2022 17:42:18 -0400, Juan Luis Baptiste @.***> wrote:

Hi @DavidWHodgins,

As previously requested please make it clear these are images created by one person. They are not official Mageia images. They have not passed qa testing. They have not been approved by council, which in the past made the choice that while we provided docker, we do not provide docker images of Mageia.

Could you point us to the discussion where this decision was taken by the council? I have been maintaining these images with the help from @Conan-Kudo since 2014, and in all this time, this is the first time I hear about this complaint from the council. Last discussion I remember about the docker images on the dev mailing list was last year when I announced the new mageia 8 images, and some devs raised concerns about the images not being built and signed on mageia own infrastructure and I explained to them that technically it was not possible because the docker official images are built by the docker team from the sources from this repo, and the discussion ended after that, apparently everyone was ok with the current process.

@tianon as you are part of the team that maintains the official docker images for multiple of other linux distros like, for example fedora, could ou explain us how the manage the build process of the images and QA of them ? do the do things differently from us ?

@Conan-Kudo do you have any thoughts on this ?

It seems I mis-remembered. The council never voted on it. My apologies. I have called for a formal vote now though.

Regards, Dave Hodgins

juanluisbaptiste commented 2 years ago

From the Board discussion, I found out another Board/Council member (Neal Gompa) is also involved. Unlike Juan who is no longer contributing to Mageia, Neal is active.

What? Just because I decided to contribute my spare time in another way to mageia that was more useful for the project instead to continue to maintain hundreds of distribution packages does not mean I'm not actively contributing! I have been part of mageia since day one in 2010 and Mandriva long before that, and continue to do so, but in a different way. What's wrong with helping mageia have a presence in the cloud, like most distributions have?

While we do have the docker packages available to our users and are fine with the distribution of scripts to enable individuals to build their own images using Mageia packages, the council chose not to distribute docker images or any other container format images due to the increase in workload it would add, as every update of an rpm package that's included in a container would then also require rebuilding and testing the container(s).

I understand your concerns, but I think they mainly come from not understanding how docker images work, nor have worked with them. A docker docontainer works basically the same way as a VM, if an updated package is added to the updates repository, any container can be updated to install it in the same way that a traditional install, just run a urpmi.update -a, or create a custom image that uses the mageia image as a base and runs that command as the first thing done when it is built.

Updates of the mageia can be (semi)automated, if you look at build2release script, we are already halfway through. We can already automate the image build and publish to this repo, the second step is manual, as it requires creating a PR on the [docker official images library](https://github.com/docker-library/official-images, which will be manually reviewed by @tianon or someone else from his team and approved in less than a day (most of the time). Currently, mageia images are updated in two steps: run the build2release.sh script to create and upload the rootfs tarballs to this git repository and update the Dockerfile of each version, and then manually create the corresponding PR at the docker library asking to update the docker official release to use the new set of images. The PR creation could be automated too, to avoid any intervention from this side. Acceptance tests could be added and automated too if needed, avoiding adding extra work to the QA team as that is one of the concerns.

I know images have not been updated in a little more than a year but it is because of this issue which I do not know how to fix, I have asked @Conan-Kudo for help.

I think we should start again a constructive public discussion in the dev mailing list to address any concerns about this docker image, so it complies with current mageia policies and QA standards, instead of throwing away all this work and leaving mageia without a cloud presence.

juanluisbaptiste commented 2 years ago

It seems I mis-remembered. The council never voted on it. My apologies. I have called for a formal vote now though. Regards, Dave Hodgins

Can I at least have a say on this before the vote? As I said in my previous post, I think most of the concerns comes from misunderstandings on how docker images work and how updates can be automated, at the very least after all the work I have put on this project I should deserve the opportunity to be heard by the council and clarify any concerns they have.

Also, the mageia community should be involved too as there are current mageia docker image users, the image has more than 1M+ downloads.

tianon commented 2 years ago

I think Ubuntu is probably a decent (similar) example here -- they build, QA, and then publish all the rootfs tarballs that become https://hub.docker.com/_/ubuntu entirely on Canonical-run infrastructure. For base images like this, the only difference between publishing to a registry and publishing to official images is the API through which the tarball gets uploaded (in our case, it goes through a Git repository with some light review - for base images, that review is usually just making sure something like grub didn't sneak in unexpectedly).

One thing that's common in other distributions is that chroots (or similar) are often used for building packages for the distribution in an isolated clean environment, and the way the rootfs for those is built is usually very similar (if not exactly the same) as building a rootfs for a Docker container, so there's often enough overlap that they can be the same thing (and thus publishing the raw rootfs tarballs might be useful for non-Docker users too). There are also other containerization technologies (nspawn, etc) for which having minimal pre-built rootfs tarballs is an interesting and useful thing.

A great example of a container-similar application IMO is WSL (on Windows) - the tarballs/rootfs used by WSL are also very similar to those used by Docker, and it's reasonably easy to take a rootfs built for Docker use and import it into WSL (or adapt it into a proper Microsoft Store entry, if you wanted to go through that process).

DavidWHodgins commented 2 years ago

On Wed, 13 Jul 2022 22:46:53 -0400, Juan Luis Baptiste @.***> wrote:

It seems I mis-remembered. The council never voted on it. My apologies. I have called for a formal vote now though. Regards, Dave Hodgins

Can I at least have a say on this before the vote? As I said in my previous post, I think most of the concerns comes from misunderstandings on how docker images work and how updates can be automated, at the very least after all the work I have put on this project I should deserve the opportunity to be heard by the council and clarify any concerns they have.

Also, the mageia community should be involved too as there are current mageia docker image users, the image has more than 1M+ downloads.

I'm trying to learn more about it so I can give it a better evaluation. I'm having trouble getting it to run with persistent data. The documentation needs a lot of work.

Can you post what commands you ran to get it to work with persistent storage?

Thanks, Dave Hodgins

DavidWHodgins commented 2 years ago

Managed to get persistent storage with ... $ docker volume create m8 $ docker run -it --mount source=m8,target=/root/data --name mageia bash

do some stuff creating files in /root/data

exit

$ docker start mageia $ docker attach mageia

confirm data in /root/data is saved

I'm still missing how an application can be installed within the docker image.

Conan-Kudo commented 2 years ago

I know images have not been updated in a little more than a year but it is because of https://github.com/juanluisbaptiste/docker-brew-mageia/issues/28 which I do not know how to fix, I have asked @Conan-Kudo for help.

I've had a bunch of IRL things happen to delay my work on identifying the problem, but it is on my radar.

What? Just because I decided to contribute my spare time in another way to mageia that was more useful for the project instead to continue to maintain hundreds of distribution packages does not mean I'm not actively contributing! I have been part of mageia since day one in 2010 and Mandriva long before that, and continue to do so, but in a different way. What's wrong with helping mageia have a presence in the cloud, like most distributions have?

I agree that it's not fair to exclude @juanluisbaptiste as a Mageia contributor because he primarily works on the container images. His work is valuable and worth supporting in the project.

I'm trying to learn more about it so I can give it a better evaluation. I'm having trouble getting it to run with persistent data. The documentation needs a lot of work.

Can you post what commands you ran to get it to work with persistent storage?

To set up persistent volumes, just run like so:

$ docker run -it -v $HOME/data:/data mageia:8

The actual container data will be stored in ~/data and mounted into the container as /data. Whatever applications or whatever that's configured to use /data will get stored outside of the container image.

I'm still missing how an application can be installed within the docker image.

It works the same way it does for VMs or real machines: use dnf or urpmi.

The value of container images is that users can construct scripts in the form of Containerfiles/Dockerfiles that produce an image layered on top of the base image with software installed and configured appropriately. Then you can run the container and configure it with networking and volumes as desired.

juanluisbaptiste commented 2 years ago

I'm trying to learn more about it so I can give it a better evaluation. I'm having trouble getting it to run with persistent data. The documentation needs a lot of work. Can you post what commands you ran to get it to work with persistent storage? Thanks, Dave Hodgins

Well, the idea is not to replicate the docker documentation here, normally when someone is trying to use a docker image they already know how containers work and probably also know how to use them. There are several ways to use a docker image depending on the platform you are running it, be it locally, or on a kubernetes cluster, on nomad, docker swarm, mesos, etc., it would be a pretty long documentation. Besides, the documentation of the image is standarized among all official docker images, they should only show available versions, where is the code to create them, where to report issues with it and a small example on now to use it as a base image.

You should go through the docker official documentation to understand the container concepts first.

But basically, for what you are asking what you need to do is to tell docker to create a volume where it will store the container data. There are plenty of ways to define a volume, handled by docker internally, in memory, using a storage plugin or with a bind volume, which is the one I'm going to use with this example as it is the one that shows more clearly the volume concept:

$ docker run -ti -v $PWD/data:/data mageia:8 bash
Unable to find image 'mageia:8' locally
8: Pulling from library/mageia
Digest: sha256:ee8deeb5ab22773a38ee147c98127b2faa5edc72272beef5d497db44c4fda658
Status: Downloaded newer image for mageia:8
[root@e42b3483add1 /]# cd data
[root@e42b3483add1 data]# ls
[root@e42b3483add1 data]# touch test 
[root@e42b3483add1 data]# exit
exit
$ ls data
test

With -v $PWD/data:/data we are telling docker to define a volume that will use a directory in the host system (your machine) called $PWD/data and will be mounted inside the /data directory inside the container.

But running a container like that is not usually the way of doing it, this would be more useful for tests. What is normally done is to define a Dockerfile that uses this image as a base, and then install some packages that will give the resulting image a more defined purpose. For example, install nginx to run a web server.

FROM mageia:8
label MAINTAINER="Mageia Community"

#RUN urpmi.addmedia --distrib --mirrorlist '$MIRRORLIST'
RUN urpmi.update -a && urpmi --auto-select --auto 
RUN urpmi --auto nginx

# Define volumes this container uses
VOLUME ["/var/www/html"]

# Define init command
CMD ["nginx", "-g", "daemon off;"]

# Expose ports
EXPOSE 80
EXPOSE 443

Then, to run this image:

$ ls 
Dockerfile
$ docker build -t mageia:nginx .
[...]
$ echo 'Hello!!' > data/index.html
$ docker run -ti -v $PWD/data:/usr/share/nginx/html mageia:nginx -p 80:80 

Then open up http://localhost on a browser.

That is why these Linux distribution official images are minimal installs, so each user can customize them with a Dockerfile to do whatever they need, being very specific and light, compared with a traditional VM.

There is another tool called docker-compose that is useful when you need to run multiple containers locally, for example, a web server for a WordPress install and a MySQL database, you should check that out too.

I hope this helps.

praiskup commented 1 year ago

I'm not sure where to ask if this is not the official place; but, could the images be updated? It appears mageia:cauldron is so old that we can not even dnf update inside.

ozky84 commented 1 year ago

I'm not sure where to ask if this is not the official place; but, could the images be updated? It appears mageia:cauldron is so old that we can not even dnf update inside.

Devs are very busy as Mageia 9 release is coming...Maybe when it's released juanluisbaptiste have time to push updated images.... I personally use Distrobox with Debian Sid and Fedora Rawhide installing new version software.. Like to use Cauldron images if they will be updated available in Docker hub....