Skip to content

Commit

Permalink
Fix open port issue when starting container
Browse files Browse the repository at this point in the history
  • Loading branch information
grkvlt committed Sep 18, 2015
1 parent 55ca58b commit cf1a280
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public DockerContainerLocation createLocation(Map flags) {
.put(LocationConfigKeys.PRIVATE_KEY_DATA, null)
.put(LocationConfigKeys.PRIVATE_KEY_FILE, null)
.put(CloudLocationConfig.WAIT_FOR_SSHABLE, false)
.put(JcloudsLocationConfig.INBOUND_PORTS, getOpenPorts(entity))
.put(JcloudsLocationConfig.INBOUND_PORTS, options.getInboundPorts())
.put(JcloudsLocation.USE_PORT_FORWARDING, true)
.put(JcloudsLocation.PORT_FORWARDER, subnetTier.getPortForwarderExtension())
.put(JcloudsLocation.PORT_FORWARDING_MANAGER, subnetTier.getPortForwardManager())
Expand Down Expand Up @@ -615,7 +615,7 @@ public void deleteLocation() {

/** Returns the set of configured ports an entity is listening on. */
protected Set<Integer> getOpenPorts(Entity entity) {
Set<Integer> ports = MutableSet.of();
Set<Integer> ports = MutableSet.of(22);
for (ConfigKey<?> k: entity.getEntityType().getConfigKeys()) {
if (PortRange.class.isAssignableFrom(k.getType())) {
PortRange p = (PortRange) entity.config().get(k);
Expand Down

0 comments on commit cf1a280

Please sign in to comment.