Skip to content

Commit

Permalink
Check for allowed characters in Docker container name
Browse files Browse the repository at this point in the history
  • Loading branch information
grkvlt committed Apr 13, 2015
1 parent ec4d43f commit 381a250
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import brooklyn.entity.basic.ServiceStateLogic;
import brooklyn.entity.basic.SoftwareProcess;
import brooklyn.entity.container.DockerAttributes;
import brooklyn.entity.container.DockerUtils;
import brooklyn.event.basic.PortAttributeSensorAndConfigKey;
import brooklyn.event.basic.Sensors;
import brooklyn.event.feed.ConfigToAttributes;
Expand Down Expand Up @@ -424,7 +425,7 @@ public DockerContainerLocation createLocation(Map flags) {
containerName = getAttribute(DOCKER_CONTAINER_NAME);
}
if (Strings.isNonBlank(containerName)) {
options.nodeNames(ImmutableList.of(containerName));
options.nodeNames(ImmutableList.of(DockerUtils.allowed(containerName)));
}

// put these fields on the location so it has the info it needs to create the subnet
Expand Down

0 comments on commit 381a250

Please sign in to comment.