-
Notifications
You must be signed in to change notification settings - Fork 564
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
Config.Volumes Usage #132
Comments
I believe that shared volumes are specified with the StartContainer method along with its HostConfig and its Not sure if it is the right way to do it but least that was how I made it work :-) |
I see, thanks. Some more detailed documentation would be nice, but examples suffice for what I'm trying to do. Also, the official Docker documentation is sorely lacking in this area, so I don't necessarily think it's the client's responsibility to document it. |
@zfjagann no problem, it's a common source of confusion. People is used to call We need to improve the examples that we have in the source, that is used both for documentation and to keep our API ok. Currently, we have only examples for AttachToContainer, BuildImage and CopyFromContainer. |
may be useful for someone resp, err := cli.ContainerCreate(ctx, &container.Config{ |
I'm trying to create a new container using the CreateContainer method.
I want the container to mount a directory on the host inside the container, just like using the
docker run -v /xyz:/abc
format.I've been looking at the Config type's Volumes field and can't figure out the appropriate value for the
struct{}
as the value type of the map.I've tried passing in a variety of parameters for it, and none of them seem to work.
Is there some working sample code somewhere for how to pass in the values for Config.Volumes?
The text was updated successfully, but these errors were encountered: