-
Notifications
You must be signed in to change notification settings - Fork 19
Dockerization for 03-rwslotmachine #58
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
Conversation
razvand
left a comment
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.
Create two properly worded commits. See instructions here:
- One commit adds
Dockerfileand correspondingMakefile. - One commit adds
Makefilefor solution.
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...ations-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/sol/Makefile
Outdated
Show resolved
Hide resolved
...s-and-defensive-strategies/defense-mechanisms/activities/03-rwslotmachine3/deploy/Dockerfile
Outdated
Show resolved
Hide resolved
razvand
left a comment
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.
Use present tense.
Use your full name in the commit messages, i.e. use Cosmin Tanasa <[email protected]> instead of cosmintanasa47 <[email protected]>
razvand
left a comment
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 README.md detailing how to run / deploy the container. Nothing out of the ordinary. See sample README from here.
cb76137 to
f893418
Compare
|
@cosmintanasa47 , use athe |
…ckerization Add a multi-stage Dockerfile that builds the 32bit binary for the rwslotmachine3.c file and runs the binary on port 31346. Local port for build container is 32000 and the runtime container uses port 32001. Add a Makefile that handles the Dockerfile's build, run and stop. It works on my computer. Disk usage seems to be too high. May need improvements. Resolves: open-education-hub#50 Signed-off-by: Cosmin Tanasa <[email protected]>
This Makefile is used inside the containers to build the executable, check if the executable exists and also to check if the executable is running on port 31346. Resolves: open-education-hub#50 Signed-off-by: Cosmin Tanasa <[email protected]>
README file so everyone knows how to use the containers. Resolves: open-education-hub#50 Signed-off-by: Cosmin Tanasa <[email protected]>
razvand
left a comment
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.
Reviewed-by: Razvan Deaconescu [email protected]
Approved-by: Razvan Deaconescu [email protected]
I think it works. Tested the containers and worked on my computer. Disk usage seems to be too high. May need improvements. Don't know if this is enough to do the challenge/activity.
Prerequisite Checklist
Description of changes
Added a Dockerfile that creates the environment to build and run the executable.
Added a Makefile to handle the Dockerfile (build, run, etc.)
Added a Makefile that is uploaded to the container and builds the executable, checks for the existence of the executable and checks if the executable is operating on port 31346.
With rwslotmachine3_runtime-cnt container running, I tested the communication with the app using nc and this was the result:
nc 127.0.0.1 32000
==== www / rww ====
|>2
Input slot index: 3
Input new slot value: 3
Slot[3]:= 0003
==== www / rww ====
|> 1
==== www / rww ====
|> 3
nc 127.0.0.1 32000
==== www / rww ====
|> 1
Input slot index: 3
Slot[3]: 0000
==== www / rww ====
|> 3
32000 - local port linked with container port 31346.