Skip to content

Remove submodules and adjust Dockerfile to no submodules setup - #13

Merged
razvand merged 2 commits into
mainfrom
razvand/fix/zeratool-docker
Aug 25, 2026
Merged

Remove submodules and adjust Dockerfile to no submodules setup#13
razvand merged 2 commits into
mainfrom
razvand/fix/zeratool-docker

Conversation

@razvand

@razvand razvand commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Remove submodules. We store all modules in the same directory, without submodules. We reference them as ../<module-name>.

Adjust the Dockerfile to missing submodules. The contents of Zeratool are located in ../zeratool_lib.

We store all modules in the same directory, without submodules. We
reference them as `../<module-name>`.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@upb.ro>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository to stop using Git submodules and adjusts the Zeratool-lib Docker build to work with a “sibling modules in parent directory” layout (e.g., ../zeratool_lib).

Changes:

  • Removed Git submodule configuration (.gitmodules).
  • Updated docker/Dockerfile.zeratool_lib COPY paths to match a parent-directory build context and local zeratool_lib folder.
  • Updated README build command to use .. as the Docker build context.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

File Description
README.md Updates Docker build instructions to use the parent directory as build context.
docker/Dockerfile.zeratool_lib Adjusts COPY sources for the no-submodules layout and dependency handling.
.gitmodules Removes submodule declarations (commons, zeratool_lib).
Suppressed comments (1)

docker/Dockerfile.zeratool_lib:46

  • COPY ./automatic_exploit_generation/docker/protobuf /protobuf points to a path that doesn’t exist in this repository (there is no docker/protobuf directory). This will make docker build fail and also breaks the service’s import exploit_pb2/import exploit_pb2_grpc expectations.
COPY ./automatic_exploit_generation/docker/protobuf /protobuf

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/Dockerfile.zeratool_lib
Comment thread README.md
@razvand razvand added the enhancement New feature or request label Aug 11, 2026
@razvand
razvand force-pushed the razvand/fix/zeratool-docker branch from 7fec9aa to bac7a34 Compare August 11, 2026 07:14
@razvand
razvand requested a lite review from Copilot August 11, 2026 07:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (1)

docker/Dockerfile.zeratool_lib:29

  • The image still sets PYTHONPATH to include /commons, but the Dockerfile no longer clones or copies the commons sources into the image. This will break imports like from commons... at runtime (and may also break dependency conversion if commons is referenced as a path dependency). Add a COPY for commons from the build context.
# Set PYTHONPATH
ENV PYTHONPATH=/zeratool_lib/zeratool_lib:/protobuf:/automatic_exploit_generation:/commons

# Copies service's dependencies
COPY ./automatic_exploit_generation/docker/requirements.txt /requirements.service.txt

Adjust the Dockerfile to missing submodules. The contents of Zeratool
are located in ../zeratool_lib.

Signed-off-by: Razvan Deaconescu <razvan.deaconescu@upb.ro>
@razvand
razvand force-pushed the razvand/fix/zeratool-docker branch from bac7a34 to 38eaec4 Compare August 11, 2026 07:31
@razvand
razvand requested a lite review from Copilot August 11, 2026 07:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Suppressed comments (4)

README.md:78

  • The build instructions now use .. as the Docker build context, which will send the entire parent directory to the Docker daemon (potentially large) and the README doesn’t mention the required adjacent directory layout (../commons and ../zeratool_lib). This can cause slow builds and confusing failures if those directories aren’t present.
1. Build the Docker image: 

   ```console
        docker build --tag zeratool_lib -f docker/Dockerfile.zeratool_lib ..
**docker/Dockerfile.zeratool_lib:16**
* `COPY ./commons /commons` hardcodes the expected sibling directory name in the build context. If the commons repo is checked out under a different folder name, the image build will fail; using an `ARG` makes this portable without changing the default behavior.

Copy commons

COPY ./commons /commons

**docker/Dockerfile.zeratool_lib:35**
* The Dockerfile now hardcodes the module directory name (`./automatic_exploit_generation/...`) inside the build context. This makes `docker build` brittle (it fails if the repo is checked out into a differently named folder). Consider parameterizing the module root with an `ARG` and using it for all related `COPY` paths.

Copies service's dependencies

COPY ./automatic_exploit_generation/docker/requirements.txt /requirements.service.txt

Convert module's dependencies

COPY ./automatic_exploit_generation/pyproject.toml /pyproject.toml

**docker/Dockerfile.zeratool_lib:12**
* `COPY ./zeratool_lib ...` assumes a fixed directory name in the build context. Since the context is now the parent directory, the build will fail if the sibling folder has a different name/location. Making this configurable via an `ARG` keeps the Dockerfile usable across different checkouts/layouts.

This issue also appears in the following locations of the same file:
- line 15
- line 31

Convert Zeratool's dependencies

COPY ./zeratool_lib /zeratool_lib
RUN python3 /convert.py --no-version /zeratool_lib

</details>

@AmaliaI12 AmaliaI12 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested it and it works as expected. LGTM

@ClaraStefania ClaraStefania left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Everything works as expected.

@razvand
razvand merged commit a7dbabf into main Aug 25, 2026
1 check passed
@razvand
razvand deleted the razvand/fix/zeratool-docker branch August 25, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants