Skip to content

Conversation

@AmaliaI12
Copy link
Contributor

@AmaliaI12 AmaliaI12 commented May 6, 2025

…rwslotmachine4

Prerequisite Checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Updated relevant documentation (if needed).

Description of changes

@AmaliaI12 AmaliaI12 changed the title chapters/mitigations-and-defensive-strategies: Add Dockerfile for 04-… 04-rwslotmachine: Add Dockerfile May 10, 2025
@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 06648b5 to 09e236d Compare May 10, 2025 08:29
@AmaliaI12 AmaliaI12 changed the title 04-rwslotmachine: Add Dockerfile 04-rwslotmachine4: Add Dockerfile May 10, 2025
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Are other Dockerfile files using two stages?

Should there be a Makefile to build the application (and run make inside the Dockerfile), and a Makefile to automate the process of building and running Docker? As in this PR.

@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch 2 times, most recently from 7e636b6 to 75743c4 Compare May 16, 2025 14:47
@AmaliaI12 AmaliaI12 requested a review from razvand May 16, 2025 14:48
@razvand razvand self-assigned this May 17, 2025
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Extend your commit message with a commit description. Mention the rationale / motivation for adding a Dockerfile.

I would suggest, if possible, you renamed the Makefile to Makefile.sol. And add a new Makefile that is going to be used for deploying the Docker container, similar to the one below:

PORT ?= 31900
IMG_NAME ?= ez
CONT_NAME ?= $(IMG_NAME)-cnt

build:
	docker build -t $(IMG_NAME) -f Dockerfile ..

run: build
	docker run -d --rm -p $(PORT):31337 --name $(CONT_NAME) -t $(IMG_NAME)

stop:
	-docker stop $(CONT_NAME)

clean: stop
	docker rm $(CONT_NAME)

.PHONY: build run stop clean

@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 75743c4 to 97f2427 Compare May 17, 2025 08:50
@AmaliaI12 AmaliaI12 requested a review from razvand May 17, 2025 08:52
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Add ending newline in all files.

@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 97f2427 to 450fc72 Compare May 17, 2025 10:46
Add Dockerfile and Makefile to containerize 04-rwslotmachine4 app

Signed-off-by: Amalia Ionescu <ionescu.amalia98@gmail.com>
@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 450fc72 to b9188ba Compare May 17, 2025 10:49
@AmaliaI12 AmaliaI12 requested a review from razvand May 17, 2025 11:02
razvand
razvand previously approved these changes May 17, 2025
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Razvan Deaconescu razvand@unikraft.io
Approved-by: Razvan Deaconescu razvand@unikraft.io

@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 5a0053f to 96f02af Compare May 17, 2025 14:37
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Use Tab-based indenting for the implementation of read_int().

@AmaliaI12 AmaliaI12 requested a review from razvand May 17, 2025 14:45
@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 96f02af to 979de0f Compare May 17, 2025 14:47
razvand
razvand previously approved these changes May 17, 2025
Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Razvan Deaconescu razvand@unikraft.io
Approved-by: Razvan Deaconescu mailto:razvand@unikraft.io

Add implementation of read_int() for integer input parsing

Signed-off-by: Amalia Ionescu <ionescu.amalia98@gmail.com>
@AmaliaI12 AmaliaI12 force-pushed the 04-rwslotmachine4/add-dockerfile branch from 979de0f to 7843fd5 Compare May 17, 2025 15:01
@razvand razvand merged commit ab3b73a into open-education-hub:main May 17, 2025
2 of 3 checks passed
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.

2 participants