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

4 commits

Author SHA1 Message Date
Vincent Demeester
dfc6c04fa3 Add test coverage to opts and refactor
- Refactor opts.ValidatePath and add an opts.ValidateDevice
  ValidePath will now accept : containerPath:mode, hostPath:containerPath:mode
  and hostPath:containerPath.
  ValidateDevice will have the same behavior as current.

- Refactor opts.ValidateEnv, opts.ParseEnvFile
  Environment variables will now be validated with the following
  definition :
  > Environment variables set by the user must have a name consisting
  > solely of alphabetics, numerics, and underscores - the first of
  > which must not be numeric.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-07-12 10:33:30 +02:00
Matthieu Hauglustaine
e848494017 Return bufio error if set in ParseEnvFile
Return an error value if bufio failed to properly read a token.
Avoids running a container with partial environment.

Fixes: #14266

Signed-off-by: Matthieu Hauglustaine <matt.hauglustaine@gmail.com>
2015-07-01 17:17:48 +02:00
Vincent Batts
500c8ba4b6 env-file: variable behavior
trim the front of variables. Error if there are other spaces present.
Leave the value alone.

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-31 14:45:13 -04:00
Vincent Batts
ff4ac7441b --env-file: simple line-delimited
match dock functionality, and not try to achieve shell-sourcing compatibility

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
2014-03-31 14:45:13 -04:00
Renamed from pkg/opts/envfile.go (Browse further)