Below is the current working way to do volume bindings:
volumes= ['/host_location']
volume_bindings = {
'/host_location': {
'bind': '/container_location',
'mode': 'rw',
},
}
host_config = client.create_host_config(
binds=volume_bindings
)
container = client.create_container(
image='josepainumkal/vwadaptor:jose_toolUI',
name=container_name,
volumes=volumes,
host_config=host_config,
)
response = client.start(container=container.get('Id'))