05-rwslotmachine5: Add Makefile and Dockerfile#57
Open
iedis wants to merge 1 commit intoopen-education-hub:mainfrom
Open
05-rwslotmachine5: Add Makefile and Dockerfile#57iedis wants to merge 1 commit intoopen-education-hub:mainfrom
iedis wants to merge 1 commit intoopen-education-hub:mainfrom
Conversation
razvand
requested changes
May 17, 2025
Comment on lines
1
to
29
| # --- Build --- | ||
| FROM gcc:latest AS builder | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy the source code | ||
| COPY ./rwslotmachine5.c . | ||
|
|
||
| # Build the C program | ||
| RUN gcc -o rwslotmachine5 rwslotmachine5.c | ||
|
|
||
| # --- Runtime --- | ||
| FROM ubuntu:22.04 | ||
|
|
||
| # Install minimal libraries needed for runtime | ||
| RUN apt-get update && apt-get install -y libstdc++6 && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Set working directory | ||
| WORKDIR /app | ||
|
|
||
| # Copy compiled binary from builder stage | ||
| COPY --from=builder /app/rwslotmachine5 . | ||
|
|
||
| # Expose port | ||
| EXPOSE 31348 | ||
|
|
||
| # Run the executable | ||
| CMD ["/app/rwslotmachine5"] No newline at end of file |
Contributor
There was a problem hiding this comment.
There are too many comments. Some of the commands are self-explanatory, remove those comments.
1d0dc78 to
c4f6c7e
Compare
Signed-off-by: Edis Perchiata <edisperchiata@yahoo.com> 05-rwslotmachine5: Clean up code Remove unnecessary comments and add ending newline in Makefile and Dockerfile Signed-off-by: Edis Perchiata <edisperchiata@yahoo.com>
c4f6c7e to
bb5a054
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisite Checklist
Description of changes