merll / docker-fabric

Integration of Docker deployments into Fabric.
MIT License
79 stars 10 forks source link

Invalid Hostname #14

Closed ambsw-technology closed 7 years ago

ambsw-technology commented 7 years ago

When testing the following script as part of #13, I was getting an invalid hostname error.

from dockermap.map.container import ContainerMap
from dockermap.map.input import ContainerLink
from dockerfabric.apiclient import docker_fabric, container_fabric

maps = ContainerMap('test_map', {
    'host_root': '~',
    'u1': {
        'image': 'ubuntu:latest',
    }
})

container_fabric_inst = container_fabric(container_maps=maps)
container_fabric_inst.startup('u1')
ambsw-technology commented 7 years ago

Eventually, I determined that this is due to changes in the acceptable characters in docker. The underscore that was previously valid is no longer so. Removing the underscore from the container map name resolve the issue.