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

docker: use a "slim" base image #342

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Conversation

chatziko
Copy link
Contributor

@chatziko chatziko commented Jan 7, 2024

This tiny PR changes the docker base image from python:3.8-buster to python:3.8-slim-buster. This most likely has no functional difference (tested only on a raspberry pi with gpiod), and reduces the uncompressed image from 855MB to just 144MB (pretty shocking, not sure why such a huge difference).

It also adds --no-cache-dir to pip, which saves a tiny bit more.

@BenjiU BenjiU merged commit fe3a537 into flyte:develop Feb 19, 2024
5 checks passed
BenjiU added a commit that referenced this pull request Feb 27, 2024
BenjiU added a commit that referenced this pull request Feb 27, 2024
@BenjiU
Copy link
Collaborator

BenjiU commented Feb 28, 2024

@chatziko: This changes breaks our delivery. Have you tested building with slim docker? Have you had to change something?

@chatziko
Copy link
Contributor Author

@chatziko: This changes breaks our delivery. Have you tested building with slim docker? Have you had to change something?

I built (and activelly use in two different raspberry pis) an arm64 image using the exact committed Dockerfile, it worked fine. The exact build command:

docker buildx build --platform=linux/arm64 -t mqtt-io --load  .

I also built (but did not test) and amd64 image without problem.

What kind of problem did you get?

@BenjiU
Copy link
Collaborator

BenjiU commented Feb 28, 2024

@chatziko: hmm, strange...
With your changes, we get https://github.com/flyte/mqtt-io/actions/runs/8055315759/job/22002238188#step:6:2738

#29 433.2 Failed to build msgpack
#29 433.2 ERROR: Could not build wheels for msgpack, which is required to install pyproject.toml-based projects

hmm, I need to look, what platform is causing the issue...

@chatziko
Copy link
Contributor Author

arm/v7 is the problem, #352 likely fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants