Skip to content

Commit

Permalink
Added config for docker dns parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
fmichielssen committed Sep 2, 2016
1 parent a1fee08 commit 48f4dcd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main/java/eu/openanalytics/services/AppService.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public static class ShinyApp {
private String description;
private String[] dockerCmd;
private String dockerImage;
private String[] dockerDns;
private String[] ldapGroups;

public String getName() {
Expand Down Expand Up @@ -119,6 +120,13 @@ public void setDockerImage(String dockerImage) {
this.dockerImage = dockerImage;
}

public String[] getDockerDns() {
return dockerDns;
}
public void setDockerDns(String[] dockerDns) {
this.dockerDns = dockerDns;
}

public String[] getLdapGroups() {
return ldapGroups;
}
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/eu/openanalytics/services/DockerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ private Proxy startProxy(String userName, String appName) {
List<PortBinding> hostPorts = new ArrayList<PortBinding>();
hostPorts.add(PortBinding.of("0.0.0.0", proxy.port));
portBindings.put("3838", hostPorts);
final HostConfig hostConfig = HostConfig.builder().portBindings(portBindings).build();
final HostConfig hostConfig = HostConfig.builder()
.portBindings(portBindings)
.dns(app.getDockerDns())
.build();

final ContainerConfig containerConfig = ContainerConfig.builder()
.hostConfig(hostConfig)
Expand Down

0 comments on commit 48f4dcd

Please sign in to comment.