Skip to content

Add Docker network commands and update execution logic for container networking.#21

Merged
gustavofreze merged 1 commit intomainfrom
feature/develop
Apr 14, 2026
Merged

Add Docker network commands and update execution logic for container networking.#21
gustavofreze merged 1 commit intomainfrom
feature/develop

Conversation

@gustavofreze
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings April 14, 2026 02:51
Copy link
Copy Markdown

Copilot AI left a comment

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 extends the container runtime flow to support Docker network host connectivity by introducing a docker network connect command and wiring it into the container start sequence when running inside Docker.

Changes:

  • Added a HostEnvironment utility to detect Docker execution and fetch the current container hostname.
  • Introduced DockerNetworkConnect and updated ContainerCommandHandler::run() to connect the “host” (test-runner) container to the target network when inside Docker.
  • Updated unit tests and mocks to account for the additional network-connect command and added a regression test for the “outside Docker” path.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Unit/MySQLDockerContainerTest.php Adjusts expected command ordering after inserting network connect; removes a redundant factory-instance assertion.
tests/Unit/Mocks/ClientMock.php Adds support for executing the new network commands in the mock client.
tests/Unit/GenericDockerContainerTest.php Updates command index expectations and adds a separate-process test to force “outside Docker” behavior.
src/Internal/Containers/HostEnvironment.php Adds Docker environment detection and hostname retrieval.
src/Internal/Commands/DockerNetworkConnect.php Adds a command builder for docker network connect.
src/Internal/CommandHandler/ContainerCommandHandler.php Executes network creation and (when inside Docker) connects the host container to the network before docker run.

Comment thread src/Internal/Commands/DockerNetworkConnect.php
Comment thread src/Internal/Containers/HostEnvironment.php
Comment thread src/Internal/CommandHandler/ContainerCommandHandler.php
@gustavofreze gustavofreze merged commit 1086be2 into main Apr 14, 2026
10 checks passed
@gustavofreze gustavofreze deleted the feature/develop branch April 14, 2026 02:57
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