Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design issues with BoundHostVolumes #43

Closed
EronWright opened this issue Apr 14, 2014 · 1 comment
Closed

Design issues with BoundHostVolumes #43

EronWright opened this issue Apr 14, 2014 · 1 comment

Comments

@EronWright
Copy link

A recent commit introduced support for defining host-bound volumes (e796c76). A design issue around the overloaded use of the BoundHostVolumes type has led to hacky and incomplete support for inspecting containers that contain volumes.

For background, running a Docker container involves two API calls, createContainer(ContainerConfig) and startContainer(HostConfig). Bound host volumes are partially defined in ContainerConfig and partially defined in HostConfig. Commit e796c76 strives to use a single type - BoundHostVolumes - as the property type within both ContainerConfig and HostConfig. The solution is non-functional - inspectContainer is broken and incomplete.

I propose we:

  • introduce new inner types ContainerConfig.Volumes and HostConfig.Binds that serialize/deserialize naturally.
  • re-imagine BoundHostVolumes as a 'builder' type that generates Volumes and Binds objects.
  • deprecate ContainerConfig#getVolumes and introduce a new property, getVolumes2 that returns an instance of Volumes. This is to avoid a breaking change.
  • deprecate HostConfig.getBinds and introduce a new property, getBinds2 that returns an instance of Binds. This is to avoid a breaking change.
@marcuslinke
Copy link
Collaborator

Closed as project moved to https://github.com/docker-java/docker-java. Please check if that issue still persist and reissue there if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants