Skip to content
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

Reduce docker image size #394

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Reduce docker image size #394

merged 1 commit into from
Jun 5, 2023

Conversation

sanders41
Copy link
Collaborator

Pull Request

With these changes I got ~ a 43% reduction in the final image size (1.55GB to 877MB). Note that depending on your local files present (virtual environments, etc) you may see slightly different numbers with a build, but it will always be significantly smaller.

Related issue

Fixes #<issue_number>

What does this PR do?

  • Cleans up the apt-get install section
  • Adds a .dockerignore file
  • Removes the separate install of pip3. Because the image is python:3.10.8-slim-bullseye pip is already included by default

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

@alallema alallema added the maintenance Anything related to maintenance (CI, tests, refactoring...) label Jun 5, 2023
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So cool! Thanks a lot @sanders41 for this PR
LGTM! 🔥

@alallema
Copy link
Contributor

alallema commented Jun 5, 2023

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Jun 5, 2023

@meili-bors meili-bors bot merged commit 431a08d into meilisearch:main Jun 5, 2023
@meili-bot
Copy link
Contributor

This message is sent automatically

Thank you very much for submitting your PR! Did you know that throughout the month of June we’re holding a rafle?
If you share the link to your merged PR in our #giveaway Discord channel, you’ll automatically join a lottery for a chance at winning some Meiliswag. 🙂
Don’t hesitate to join us: https://discord.com/channels/1006923006964154428/1111273670657200198

@@ -5,9 +5,15 @@ ENV LANG C.UTF-8

WORKDIR /docs-scraper

RUN apt-get update -y && apt-get install -y python3-pip libnss3 chromium-driver
RUN : \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this : notation in this line RUN : \ @sanders41? I never saw that!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just let me split it across multiple lines from the start.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, cool!! :D

@sanders41 sanders41 deleted the docker branch June 5, 2023 16:09
@alallema alallema added the enhancement New feature or request label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants