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

12 commits

Author SHA1 Message Date
Yong Tang
6106313b20 More descriptive error when running a container with a too long hostname (#21445)
This fix tries to fix issues encountered when running a container with a hostname
that is longer than HOST_NAME_MAX(64).

Previously, `could not synchronise with container process` was generated as the
length of the regex check was missing.

This fix covers the length check so that a hostname that is longer than
HOST_NAME_MAX(64) will be given a correct error message.

Several unit tests cases and additional integration test cases are added as well.

This fix closes #21445.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit fa44b4e81e)
2016-03-25 13:43:07 -04:00
Arnaud Porterie
f9f8708dc6 Merge pull request #20566 from AndrewGuenther/20371-validate-hostname
Ensure --hostname is valid
2016-03-21 14:49:16 -07:00
Yong Tang
800a7d513d Fix one-character directory issue in the volume option (#20122).
The issue comes from the implementation of volumeSplitN() where a
driver letter (`[a-zA-Z]:`) was assumed to follow either `:`, `/`,
or `\\`.

In Windows driver letter appears in two situations:
a. `^[a-zA-Z]:` (A colon followed  by `^[a-zA-Z]:` is OK as colon is
the separator in volume option)
b. A string in the format like `\\?\C:\Windows\...` (UNC).
Therefore, a driver letter can only follow either a `:` or `\\`

This PR removes the condition of `/` before the driver letter so
that options like `-v /tmp/q:/foo` could be handled correctly. A
couple of tests has also been added.

This PR fixes #20122.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-03-21 02:55:06 +00:00
Andrew Guenther
3b6ffc8022 Ensure --hostname is valid
Validates whether the given hostname is RFC 1123
(https://tools.ietf.org/html/rfc1123) compliant.

Fixes #20371

Signed-off-by: Andrew Guenther <guenther.andrew.j@gmail.com>
2016-03-17 00:23:23 -07:00
Tim Hockin
53c5de2921 Don't smoosh hostname and domainname in API
This allows users to provide a FQDN as hostname or to use distinct hostname and
domainname parts.  Depends on https://github.com/docker/libnetwork/pull/950

Signed-off-by: Tim Hockin <thockin@google.com>
2016-03-15 08:32:35 -07:00
Qiang Huang
53b0d62683 Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-02-29 19:28:37 +08:00
Antonio Murdaca
d266142230 runconfig: opts: parse: lowercase errors
also fix wrong function comment

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-02-18 11:21:44 +01:00
Alessandro Boch
2bb3fc1bc5 Allow user to choose the IP address for the container
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-01-08 10:09:16 -08:00
David Calavera
907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
Anusha Ragunathan
5190794f1d Use ImageBuildOptions in builder.
dockerfile.Config is almost redundant with ImageBuildOptions.
Unify the two so that the latter can be removed. This also
helps build's API endpoint code to be less dependent on package
dockerfile.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-01-05 10:09:34 -08:00
Daniel Nephin
c5a2fdb697 Move volume.SplitN() to the one place it is used in runconfig.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 12:06:30 -05:00
Daniel Nephin
2b7ad47bd2 Move the runconfig.Parse() function into the runconfig/opts package.
The parse.go file is used almost exclusively in the client. The few small
functions that are used outside of the client could easily be copied out
when the client is extracted, allowing this runconfig/opts package to
move to the client.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-04 12:06:29 -05:00
Renamed from runconfig/client/parse_test.go (Browse further)