1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

10 commits

Author SHA1 Message Date
Sebastiaan van Stijn
182795cff6
Do not call mount.RecursiveUnmount() on Windows
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-29 23:00:16 +01:00
Timo Rothenpieler
6d593fe6cc volume/local: decouple presence of options from mounting
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Sebastiaan van Stijn
0d6dd91e13
Move validateOpts() to local_unix.go as it is not used on Windows
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-23 00:53:23 +01:00
Sebastiaan van Stijn
11b88be247
Remove validationError type, and use errdefs.InvalidParameter
Using `errors.Errorf()` passes the error with the stack trace for
debugging purposes.

Also using `errdefs.InvalidParameter` for Windows, so that the API
will return a 4xx status, instead of a 5xx, and added tests for
both validations.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-22 16:04:52 +01:00
Sebastiaan van Stijn
342f7a357a
Use a map[string]struct{} for validOpts
For consistency with `mandatoryOpts`, and because it is a
tiny-tiny bit more efficient.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-22 16:04:45 +01:00
Vincent Demeester
d5b271c155
add check for local volume option
Description:
When using local volume option such as size=10G, type=tmpfs, if we provide wrong options, we could create volume successfully.
But when we are ready to use it, it will fail to start container by failing to mount the local volume(invalid option).

We should check the options at when we create it.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-22 16:02:50 +01:00
Daniel Nephin
4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Marianna
a46f757c40 Add CreatedAt filed to volume. Display when volume is inspected.
Closes #32663 by adding CreatedAt field when volume is created.
Displaying CreatedAt value when volume is inspected
Adding tests to verfiy the new field is correctly populated

Signed-off-by: Marianna <mtesselh@gmail.com>

Moving CreatedAt tests from the CLI

Moving the tests added for the newly added CreatedAt field for Volume, from CLI to API tests

Signed-off-by: Marianna <mtesselh@gmail.com>
2017-05-26 11:47:02 -07:00
Brian Goff
b05b237075 Support mount opts for local volume driver
Allows users to submit options similar to the `mount` command when
creating a volume with the `local` volume driver.

For example:

```go
$ docker volume create -d local --opt type=nfs --opt device=myNfsServer:/data --opt o=noatime,nosuid
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-03-03 10:32:25 -05:00
John Howard
42a46ed1a4 Windows: Enabled docker volume
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-16 14:33:13 -07:00