Skip to content

Commit

Permalink
Add host mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Jul 1, 2024
1 parent 5ccb6f3 commit e6fe17d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,20 @@ protected String getServiceDescription(DockerData data) {
context: "%s"
container_name: "%s"
tty: true
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
LF_TELEGRAF_HOST_NAME: ${LF_TELEGRAF_HOST_NAME:-host.docker.internal}
"""
.formatted(getServiceName(data), getBuildContext(data), getContainerName(data));
}

private String getEnvironmentFile() {
// FIXME: add target property env-files
var file = ".env";
return "env-file: \"%s\"".formatted(file);
}

/** Return the name of the service represented by the given data. */
protected String getServiceName(DockerData data) {
return "main";
Expand Down

0 comments on commit e6fe17d

Please # to comment.