-
Notifications
You must be signed in to change notification settings - Fork 115
Enhance docker image #606
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
Enhance docker image #606
Conversation
|
||
FROM alpine:3.19 AS final | ||
FROM alpine:3.21 AS final |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which parts of this change rely on Alpine 3.21 and wouldn't work on 3.19?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit 37c9838 mentioned that the end of support for Alpine Linux v3.19.x is on 1 Nov 2025, so I upgraded it to 3.21.
This patch updates the Dockerfile but also makes large README changes. |
Also, I'd prefer using the imperative mood when describing changes [1]. |
Commit 37c9838 ("Bump Alpine Linux for Docker image") updated only the build stage but left the final stage unchanged. This commit completes the version bump by upgrading the final stage as well.
4adcb3d
to
cb03b85
Compare
Split into 3 commits. Please take another look. Thanks! |
cb03b85
to
01a703d
Compare
The CI build has succeeded, and the Docker image is available here: docker run --rm -it kaiii708/rv32emu |
01a703d
to
cac2925
Compare
Dockerfile
Outdated
@@ -9,17 +9,22 @@ COPY . . | |||
# generate execution file for rv32emu and rv_histogram | |||
RUN make | |||
RUN make tool | |||
RUN mv ./build/rv32emu ./build/rv32emu-user | |||
RUN mv ./build/rv_histogram ./build/tmp_rv_histogram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming rv_histogram to tmp_rv_histogram and then back looks a bit hacky and may confuse readers.
Since we already renamed rv32emu to rv32emu-user/rv32emu-system, how about also giving rv_histogram an rv32emu- prefix?
That way all three binaries can be renamed to their final names right after build, and the later COPY steps become cleaner and easier to follow.
cac2925
to
9c3f51a
Compare
-k rv32emu-linux-image-prebuilt/linux-image/Image \ | ||
-i rv32emu-linux-image-prebuilt/linux-image/rootfs.cpio | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we renamed rv_histogram, could we also update the README's Docker section to document how to run the histogram tool in addition to the user/system mode emulators?
Include three executables in the Docker image: - rv32emu-user: for user-mode emulation - rv32emu-system: for system-mode emulation - rv32emu-histogram: for statistical analysis This enhancement enables the Docker image to support both user-mode and system-mode emulation. Close sysprog21#581
Document how to fetch and run user-mode and system-mode artifacts from the rv32emu-prebuilt repository when using the Docker image. Link: https://github.com/sysprog21/rv32emu-prebuilt
9c3f51a
to
e5e97c8
Compare
Thank @kaiii708 for contributing! |
This commit updates the Docker image to include the following executables:
To keep the image compact, build artifacts are excluded from the final image. Instructions for retrieving prebuilt binaries are added to the README.
Close #581