Skip to content

Fix Docker image build #580

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

Merged
merged 2 commits into from
Mar 6, 2025
Merged

Conversation

ChinYikMing
Copy link
Collaborator

@ChinYikMing ChinYikMing commented Mar 1, 2025

Commit a40fd0b adds objects file that built with the lib of SDL2 and SDL2_mixer for linker when building rv_histogram, the current Docker image lacks of SDL2 and SDL2_mixer shared objects, so installing them to fix the missing shared objects.

The final Docker image size changes from around 4 MiB -> 28 MiB.

Summary by Bito

This pull request enhances the Dockerfile for the rv_histogram application by upgrading to Alpine 3.21 and adding SDL2 libraries, addressing missing shared objects and increasing the image size from 4 MiB to 28 MiB.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 2 - The changes are straightforward and primarily involve dependency updates, making the review process relatively simple.

@jserv jserv requested a review from henrybear327 March 1, 2025 13:42
@@ -1,21 +1,24 @@
FROM alpine:3.19 AS base_gcc

RUN apk add --update alpine-sdk git wget
RUN apk add --update alpine-sdk git wget sdl2-dev sdl2_mixer-dev
Copy link
Contributor

Choose a reason for hiding this comment

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

The primary reason for excluding SDL2 packages from the current Alpine Linux image is to maintain a smaller image size, which enables quicker startup and emulation through blink or similar emulators. Including SDL2 in the Alpine Linux image would create challenges when attempting to run graphics with the emulator.

@jserv
Copy link
Contributor

jserv commented Mar 1, 2025

I defer to @henrybear327 for confirmation.

Commit a40fd0b adds objects file that built with the lib of SDL2 and
SDL2_mixer for linker when building rv_histogram, the current Docker
image lacks of SDL2 and SDL2_mixer shared objects, so installing them
to fix the missing shared objects.

The final Docker image size changes from around 4 MiB -> 28 MiB.
End of support of Alpine Linux v3.19.x is on 1 Nov 2025.

Check: https://alpinelinux.org/releases/
@jserv jserv merged commit c3163e5 into sysprog21:master Mar 6, 2025
10 checks passed
@jserv
Copy link
Contributor

jserv commented Mar 6, 2025

Thank @ChinYikMing for contributing!

@ChinYikMing ChinYikMing deleted the fix-docker-build branch March 6, 2025 08:58
@jserv jserv added this to the release-2025.1 milestone Mar 6, 2025
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.

3 participants