Skip to content

Conversation

Stefan1627
Copy link

@Stefan1627 Stefan1627 commented Apr 26, 2025

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

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 Dockerfile instead of dockerfile. What is the Dockerfile model you used?

Use proper commit messages. See:

Sign your commits, use Signed-off-by: ...

@Stefan1627 Stefan1627 changed the title Added dockerfile 08-challenge-shellcode-after 08-challenge-shellcode-after: Add Makefile and Dockerfile with multi-stage pattern May 10, 2025
@Stefan1627 Stefan1627 requested a review from razvand May 10, 2025 09:02
@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.

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 <[email protected]> instead of Stefan1627 <[email protected]>.

@Stefan1627 Stefan1627 force-pushed the 08-challenge branch 3 times, most recently from 37aeb60 to ce6744b Compare May 17, 2025 08:52
@Stefan1627 Stefan1627 requested a review from razvand May 17, 2025 08:54
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.

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.

…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 <[email protected]>
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