> + .privileged(true);
> +
> + // TODO improve volumes management
> + if (volumeBindings) {
> + for (Volume v : template.getHardware().getVolumes()) {
> + hostConfigBuilder.binds(ImmutableList.of(v.getDevice() +
> ":/root"));
> + }
> + } else {
> + hostConfigBuilder.binds(ImmutableList.of("/var/lib/docker:/root"));
> + }
> + HostConfig hostConfig = hostConfigBuilder.build();
> +
> + api.getRemoteApi().startContainer(container.getId(), hostConfig);
> + container = api.getRemoteApi().inspectContainer(container.getId());
> + if (!container.getState().isRunning()) {
> + throw new IllegalStateException(String.format("Container %s has
> not started correctly", container.getId()));
Rollback the container before throwing the exception?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r10839692