Commit Graph

1242 Commits

Author SHA1 Message Date
8471c91d34 Add more helpful error message for -add-host
Fixes: #10655

As noted in the issue, bad format was being returned even if the format
was appropriate, but the IP was invalid.  This adds a better error
message for when the IP address fails validation.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 196bc32878
Component: cli
2017-05-15 11:57:13 +02:00
42e0391260 Allow IPv6 addresses in ExtraHosts option settings
Since the separator for extra host settings (for /etc/hosts in a
container) is a ":", the code that handles extra hosts needed to only
split on the first ":" to preserve IPv6 addresses which are passed via
the command line settings as well as stored in the JSON container
config.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: d656c63b21
Component: cli
2017-05-15 11:57:13 +02:00
542cb79ba6 Docker run -e FOO should erase FOO if FOO isn't set in client env
See #10141 for more info, but the main point of this is to make sure
that if you do "docker run -e FOO ..." that FOO from the current env
is passed into the container.  This means that if there's a value, its
set.  But it also means that if FOO isn't set then it should be unset in
the container too - even if it has to remove it from the env.  So,
   unset HOSTNAME
   docker run -e HOSTNAME busybox env
should _NOT_ show HOSTNAME in the list at all

Closes #10141

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 67735d2a16
Component: cli
2017-05-15 11:57:13 +02:00
5e44a300bb Deprecating ResolveRepositoryName
Passing RepositoryInfo to ResolveAuthConfig, pullRepository, and pushRepository

Moving --registry-mirror configuration to registry config

Created resolve_repository job

Repo names with 'index.docker.io' or 'docker.io' are now synonymous with omitting an index name.

Adding test for RepositoryInfo

Adding tests for opts.StringSetOpts and registry.ValidateMirror

Fixing search term use of repoInfo

Adding integration tests for registry mirror configuration

Normalizing LookupImage image name to match LocalName parsing rules

Normalizing repository LocalName to avoid multiple references to an official image

Removing errorOut use in tests

Removing TODO comment

gofmt changes

golint comments cleanup.  renaming RegistryOptions => registry.Options, and RegistryServiceConfig => registry.ServiceConfig

Splitting out builtins.Registry and registry.NewService calls

Stray whitespace cleanup

Moving integration tests for Mirrors and InsecureRegistries into TestNewIndexInfo unit test

Factoring out ValidateRepositoryName from NewRepositoryInfo

Removing unused IndexServerURL

Allowing json marshaling of ServiceConfig.  Exposing ServiceConfig in /info

Switching to CamelCase for json marshaling

PR cleanup; removing 'Is' prefix from boolean members.  Removing unneeded json tags.

Removing non-cleanup related fix for 'localhost:[port]' in splitReposName

Merge fixes for gh9735

Fixing integration test

Reapplying #9754

Adding comment on config.IndexConfigs use from isSecureIndex

Remove unused error return value from isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <don.kjer@gmail.com>
Upstream-commit: 4440f5aa3f
Component: cli
2017-05-15 11:57:12 +02:00
e362dac28b add daemon labels
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 1eda63e7e4
Component: cli
2017-05-15 11:57:12 +02:00
265a45229c Fix input volume path check on Windows
used path package instead of path/filepath so that --volumes and
--device parameters to always validate paths as unix paths instead of
OS-dependent path convention

Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
Upstream-commit: bcae148da2
Component: cli
2017-05-15 11:57:12 +02:00
c7523b18f9 Allow extra lines in /etc/hosts
This adds a --add-host host:ip flag which appends lines to /etc/hosts.  This is needed in places where you want the container to get a different name resolution than it would through DNS.  This was submitted before as #5525, closed, and now I am re-opening.  It has come up 2 or 3 times in the last couple days.

Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 4731b1ebc8
Component: cli
2017-05-15 11:57:12 +02:00
0a5e19808a Refactor all pre-compiled regexp to package level vars
Addresses #8057

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 8b27eee0f0
Component: cli
2017-05-15 11:57:12 +02:00
c5c0e2caa5 Add daemon flag to specify public registry mirrors
Adds support for a --registry-mirror=scheme://<host>[:port]
daemon flag. The flag may be present multiple times. If
provided, mirrors are prepended to the list of endpoints used
for image pull. Note that only mirrors of the public
index.docker.io registry are supported, and image/tag resolution
is still performed via the official index.

Docker-DCO-1.1-Signed-off-by: Tim Smith <timbot@google.com> (github: timbot)
Upstream-commit: cc0954586a
Component: cli
2017-05-15 11:57:12 +02:00
9b463e6bc8 Fix inconsistency in IP address parsing errors
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 561b98067f
Component: cli
2017-05-15 11:57:12 +02:00
43a7a9eb65 opts.IPVal returns an error on incorrect input
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 1edb726c0b
Component: cli
2017-05-15 11:57:12 +02:00
d71edae8a3 Helpers to parse lists, IPs, hosts, dns searches from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a6487884e5
Component: cli
2017-05-15 11:57:12 +02:00
fb885c354e opts.IpOpt: a helper to parse IP addressed from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: f34ca0a354
Component: cli
2017-05-15 11:57:12 +02:00
f324acb085 Make --attach case-insensitive
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Upstream-commit: 67a518b70c
Component: cli
2017-05-15 11:57:12 +02:00
81ffb1c91a Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 29adea2e42
Component: cli
2017-05-15 11:57:12 +02:00
acf41deb77 update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 1ed63a0f85
Component: cli
2017-05-15 11:57:12 +02:00
cd7bb080ab update for consistency
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: 84c187fe0c
Component: cli
2017-05-15 11:57:12 +02:00
422d545b21 Add support for IPv6 addresses in --dns parameters.
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <jpazdziora@redhat.com> (github: adelton)
Upstream-commit: e56ff6bda9
Component: cli
2017-05-15 11:57:12 +02:00
89b67db447 Relax dns search to accept empty domain
In that case /etc/resolv.conf will be generated with no search
option. Usage: --dns-search=.

Docker-DCO-1.1-Signed-off-by: Fabio Falci <fabiofalci@gmail.com> (github: fabiofalci)
Upstream-commit: 9fdc86ac55
Component: cli
2017-05-15 11:57:12 +02:00
69a62f5946 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)
Upstream-commit: 7297bfab30
Component: cli
2017-05-15 11:57:12 +02:00
3fc9871b30 --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)
Upstream-commit: 176347382a
Component: cli
2017-05-15 11:57:11 +02:00
f2632ce254 variable declaration cleanup
Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: 5684997e54
Component: cli
2017-05-15 11:57:11 +02:00
261c179e16 configurable dns search domains
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <daniel.norberg@gmail.com> (github: danielnorberg)
Upstream-commit: bdc62769d3
Component: cli
2017-05-15 11:57:11 +02:00
de7386fb67 move opts out of pkg because it's related to docker
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: c6c287cddc
Component: cli
2017-05-15 11:57:11 +02:00
38f0a8a08c Merge pull request #44 from cyli/root-ca-info-in-cli
Swarm cluster and node TLS info in CLI
Upstream-commit: 35c8732dc9
Component: cli
2017-05-12 17:19:23 -07:00
01a11eea42 Merge pull request #45 from aaronlehmann/configs
Add support for configs
Upstream-commit: 05267be05b
Component: cli
2017-05-12 14:03:53 -04:00
18f96c6ddf Merge pull request #70 from docker/compose-template-substitute-error-signature
Return an error instead of an `*InvalidTemplateError`
Upstream-commit: bb1a403080
Component: cli
2017-05-12 16:51:37 +02:00
41f722d69f Add support for configs
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: db5620026d
Component: cli
2017-05-11 13:42:49 -07:00
d92a25ada7 Vendor docker/docker
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 15b5dda768
Component: cli
2017-05-11 13:42:46 -07:00
48a9b5ccb4 Merge pull request #73 from vdemeester/stack-deploy-support-readonly
Add support for `read_only` services in stack deploy
Upstream-commit: c0cbb6580a
Component: cli
2017-05-11 13:53:45 -04:00
e847c7a1a6 Return an error instead of an *InvalidTemplateError
This mess things up using the `Substitute` method from
outside (i.e. the error is nil but not nil kinda)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3cac3ec9e0
Component: cli
2017-05-11 17:35:06 +02:00
d879a925c4 Add support for read_only services in stack deploy
The `read_only` key in a composefile is not taken into account right
now. Now that services support `--read-only`, so should `stack deploy`

Ref: moby/moby#32994

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0ab760a136
Component: cli
2017-05-11 17:32:52 +02:00
59d08ee4b4 Fix typo in docker.Makefile
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 076976791b
Component: cli
2017-05-11 02:02:13 -07:00
c2c82448c6 Merge pull request #32 from ColinHebert/label_3.3
Move "labels" to compose 3.3 format
Upstream-commit: 0791b27e2b
Component: cli
2017-05-10 22:11:42 -04:00
7844cb9f87 Propagate the swarm cluster and node TLS info provided by the REST API
responses to the CLI. In `node ls`, display only whether the nodes' TLS
info matches the cluster's TLS info, or whether the node needs cert rotation.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: b75858eb09
Component: cli
2017-05-10 17:49:25 -07:00
bf9b362347 Update docker dependency
We need the `pkg/term` dep from docker with OPOST added to the MakeRaw
call in order for the new runc 1.0 integration to work properly.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 56ea98f5ad
Component: cli
2017-05-10 16:07:07 -07:00
8e24a71ed1 Move "labels" to compose 3.3 format
Commit bb5dfdb8c5acd48f17498b111db360820a50baec added a
labels option to the docker-compose file format, but
added it to the 3.2 schema.

This patch moves the change to the 3.3 schema

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: 131fe7dfb2
Component: cli
2017-05-11 08:30:48 +10:00
1ae912ce6f Merge pull request #50 from aaronlehmann/secret-targets
Support Custom Secret Targets
Upstream-commit: 0f6f1eafe3
Component: cli
2017-05-10 17:04:20 -04:00
7b4cbe9700 Support Custom Secret Targets
CLI counterpart to https://github.com/moby/moby/pull/32571. Just
involves vendoring github.com/docker/docker/opts.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 978aa7ede0
Component: cli
2017-05-10 13:59:33 -07:00
c85c900b60 cli/command/system: remove ioutils dependency
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 9a892f1bbc
Component: cli
2017-05-10 13:38:06 -07:00
91afc881f6 Merge pull request #56 from dnephin/add-compose-bindata-check
Add CI validation for compose bindata
Upstream-commit: bcc46e75ab
Component: cli
2017-05-10 15:49:06 -04:00
e4ab7cd772 Vendor swarmkit f420c4b9e1535170fc229db97ee8ac32374020b1
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 85504b4f98
Component: cli
2017-05-10 11:40:19 -07:00
239a95a29d Merge pull request #55 from mlaventure/generate-proper-version
Display proper version information
Upstream-commit: ed5762cb9f
Component: cli
2017-05-10 09:34:22 +02:00
8f6076ca93 Move back to upstream go-winio which includes the
needed fixes, as well as the support for go1.8.x

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 9c32a9d1b7
Component: cli
2017-05-09 16:01:55 -07:00
db689040ae update makefiles: add “vendor” target in docker.Makefile…
… so that contributors don’t need “vndr” on their laptop

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: c1f0bee31c
Component: cli
2017-05-09 14:29:14 -07:00
bfb4425b6f Display proper version information
- The cli version defaults to "unknown-version" unless set via the VERSION env var
- The commit version can be overridden via GITCOMMIT env var
- The build time can be overridden via BUILDTIME env var

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: cf51bde7d9
Component: cli
2017-05-09 14:22:51 -07:00
4ea068a247 Add check for compose bindata.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ef1d58dd87
Component: cli
2017-05-09 15:42:22 -04:00
49eef07b9e Add github templates and initial poule configuration
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 1a549c13d3
Component: cli
2017-05-09 16:57:46 +02:00
148130f314 client: check tty before creating exec job
This is necessary in order to avoid execId leaks in the case where a
`docker exec -it` is run without a terminal available for the client.
You can reproduce this issue by running the following command many
times.

  % nohup docker exec -it some_container true

The container `some_container` will have execIDs that will never
normally be cleaned up (because the client died before they were
started).

In addition, this patch adds a docker-inspect step to ensure that we
give "container does not exist" errors consistently.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: ee7a956c54
Component: cli
2017-05-09 21:07:40 +10:00
5361203188 Merge pull request #35 from AliyunContainerService/master
Support placement preferences in stack deployment
Upstream-commit: 3d58c3feac
Component: cli
2017-05-09 09:40:04 +02:00