-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use ubuntu/debian instead of alpine in Docker image #3504
Comments
Some update: we will not use ubuntu because there is not official rust docker image with ubuntu |
The current prototype you can use to test the new image is docker run -it --rm -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:prototype-debian-docker-image-0 Please let me know here if anyone has any issue with it 🙏 |
@curquiza I support this change, but it may happen that users are extending the docker image in their own dockerfile. So this may lead to a breaking change. e.g. FROM getmeili/meilisearch:1.0.0
RUN ...do some stuff \
# this will break the user CI pipeline if alpine is switched to debian
&& apk run some alpine specific command A workaround would be to build for debian and alpine and tag the images accordingly
|
Hum you are right that's true, it can be breaking for the users... Thanks @mmachatschek for making us realize this 🙏 |
@dureuill what do you think? |
We're moving away from alpine because of its use of musl as libc, which is thought to potentially affect performance, and could cause issues specific to this libc implementation. This change is made to be consistent with what we're testing day to day. With regards to these motivations I don't think it makes sense to make this change if we're going to keep supporting both docker variants. As a result I think the solutions that make sense currently are either:
To help us decide it would be good to have some measure of how many people and CIs would be impacted by that change. Is extending the Meilisearch docker image common? What are the typical use-cases? |
I guess it can concern a lot of people since it's quite common in the Docker world to create an image based on another one. It's all the "power" of Docker. But I don't know how many people are concerned for Meilisearch specifically. I know the cloud team is doing it for example and would have to change their Dockerfile because of this change |
However, in Semver, changing a dependency is not considered as breaking, I don't know if the rule is exactly related to our situation |
to be clear here, I totally support this change. We were also running alpine images with a node application that uses prisma (it's written in rust under the hood). Alpine slowed down our application a lot and switching to the debian based images gave us a lot of performance back. there are some GH issues and blog posts that confirm this. These articles (+ internal performance tests) made me switch to the debian image because the main reason (small image size) was irrelevant as we use debian-slim that has roughly the same image size as the alpine image version.
when the meilisearch batch feature was opt in, we created a meilisearch dockerfile that just changed the command and added the cli flag to activate it. But there was no alpine specific code involved. This could have been solved via a docker-compose command config too (without needing to add a dockerfile) Those results look like most people don't use any alpine specifc commands in their dockerfile These were the only usages that I could find that apply some alpine specific commands (and where the dockerfile uses the latest tag)
preferred +1 |
@mmachatschek thank you so much this is a great answer ❤️ I thought we linked articles on musl performance somewhere but couldn't find them back after a cursory search, so thank you for contributing some of them.
Thank you for the search! Since this appears to be a manageable number of cases, I guess we could even send advance notice to these repositories before making the change. |
Thanks a lot @mmachatschek for your help here I talked with @dureuill and because of the change it involves for the users, we would rather not release it before measuring it: we want to ensure this change has a real impact on performance to deserve a breaking change on one of our tools. Even if the breaking change is not in the search engine directly, the docker image is still a widely used tool. Because of the lack of time before v1.1, we will not be able to apply this change for release v1.1, but more for release v1.2 or v1.3 I ping @meilisearch/cloud-team about the change. |
Discussed with @dureuill
Currently, in our Dockerfile, we use the alpine image as a base.
We spotted multi potential issues we could have in the future, and here is why we would rather use the ubuntu/debian image:
For all these reasons, we would rather use an ubuntu or debian image to build our own Meilisearch image at top of it
TODO
Impacted team
@meilisearch/cloud-team
The text was updated successfully, but these errors were encountered: