08-challenge-shellcode-after: Add Makefile and Dockerfile with multi-stage pattern#54
08-challenge-shellcode-after: Add Makefile and Dockerfile with multi-stage pattern#54Stefan1627 wants to merge 1 commit intoopen-education-hub:mainfrom Stefan1627:08-challenge
Conversation
razvand
left a comment
There was a problem hiding this comment.
Use Dockerfile instead of dockerfile. What is the Dockerfile model you used?
Use proper commit messages. See:
- instructions here (part of the Git workshop content)
- history of commits in the repository
Sign your commits, use Signed-off-by: ...
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Makefile
Outdated
Show resolved
Hide resolved
razvand
left a comment
There was a problem hiding this comment.
Extend your commit message with a commit description. Mention the rationale / motivation for adding a Dockerfile.
You need two Makefiles. A Makefile.sol that will be used to build the source code. That Makefile will get copied in the Dockerfile. And a Makefile (the current one) that deploys the container.
Currently you are copying the Docker Makefile and running make inside the container. That will not work.
Use a proper name for the commit authorship and signature, i.e. use Stefan Calmac <stefancalmac@gmai.com> instead of Stefan1627 <stefancalmac@gmai.com>.
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Dockerfile
Outdated
Show resolved
Hide resolved
razvand
left a comment
There was a problem hiding this comment.
Extend your commit message with a commit description. Mention the rationale / motivation for adding a Dockerfile.
Add a Makefile.sol file with the rules to build the source code file. Copy that file in the container in order to build it to an executable.
chapters/exploitation-techniques/shellcodes/drills/08-challenge-shellcode-after/Dockerfile
Outdated
Show resolved
Hide resolved
…stage pattern This Dockerfile provides a reproducible, containerized environment for the shellcode-after drill by: • Separating compilation (build stage) from execution (runtime stage) • Installing only minimal runtime dependencies (binutils, cpp, pwntools) • Exposing port 31346 so vuln & exploit.py can communicate Using multi-stage builds keeps the final image small, improves portability across CI environs, and ensures anyone can rebuild and re-run the exercise with a single `docker build && docker run` command. Signed-off-by: Stefan Calmac <stefancalmac@gmail.com>
Prerequisite Checklist
Description of changes