-
Couldn't load subscription status.
- Fork 20
05-rwslotmachine5: Add Makefile and Dockerfile #57
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
base: main
Are you sure you want to change the base?
Conversation
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.
Add ending newlines.
Sign-off-your commit.
Use proper name for author and signed-off-by.
Enhance your commit with a commit description. Use instructions here.
| # --- 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 |
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.
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
Prerequisite Checklist
Description of changes