Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions internal/docker/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ import (
"github.com/matrix-org/complement/internal/instruction"
)

var (
// HostnameRunningDocker is the hostname of the docker daemon from the perspective of Complement.
HostnameRunningDocker = "localhost"
// HostnameRunningComplement is the hostname of Complement from the perspective of a Homeserver.
HostnameRunningComplement = "host.docker.internal"
)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing as these seem unused


const complementLabel = "complement_context"

type Builder struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/docker/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func deployImage(
// interact with a complement-controlled test server.
// Note: this feature of docker landed in Docker 20.10,
// see https://github.com/moby/moby/pull/40007
extraHosts = []string{"host.docker.internal:host-gateway"}
extraHosts = []string{fmt.Sprintf("%s:host-gateway", cfg.HostnameRunningComplement)}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the main change.

Using the value from our config instead of hard-coded.

Reference: COMPLEMENT_HOSTNAME_RUNNING_COMPLEMENT -> HostnameRunningComplement

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It looks like this regressed in #389

(previously, we we're using HostnameRunningComplement here)

}

for _, m := range cfg.HostMounts {
Expand Down
Loading