Skip to content

Conversation

@vdemeester
Copy link
Collaborator

@vdemeester vdemeester commented May 15, 2017

Imports the opts package from moby/moby keeping history. Part of moby/moby#33150 👼.

Used the following to do it

git clone [email protected]:docker/docker.git
git filter-branch -f --prune-empty --subdirectory-filter opts
git filter-branch -f --index-filter \
                   'git ls-files -s | sed "s-\t\"*-&opts/-" |
                           GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
                                   git update-index --index-info &&
                    mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD
git remote add dockercli https://github.com/docker/cli.git
git remote add vdecli [email protected]:vdemeester/cli.git
git fetch -p --all
git rebase -s recursive dockercli/master
git push -f vdecli master:opts-from-docker

The last commit (87948e7) renames the import and update few variable names to not shadow the package.

vieux and others added 30 commits May 15, 2017 11:57
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
Add a --dns-search parameter and a DnsSearch
configuration field for specifying dns search
domains.

Docker-DCO-1.1-Signed-off-by: Daniel Norberg <[email protected]> (github: danielnorberg)
Docker-DCO-1.1-Signed-off-by: Daniel Norberg <[email protected]> (github: danielnorberg)
match dock functionality, and not try to achieve shell-sourcing compatibility

Docker-DCO-1.1-Signed-off-by: Vincent Batts <[email protected]> (github: vbatts)
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 <[email protected]> (github: vbatts)
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 <[email protected]> (github: fabiofalci)
Docker-DCO-1.1-Signed-off-by: Jan Pazdziora <[email protected]> (github: adelton)
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
Docker-DCO-1.1-Signed-off-by: Victor Vieux <[email protected]> (github: vieux)
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 <[email protected]> (github: erikh)
Docker-DCO-1.1-Signed-off-by: Tibor Vass <[email protected]> (github: tiborvass)
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 <[email protected]> (github: timbot)
Addresses #8057

Docker-DCO-1.1-Signed-off-by: Phil Estes <[email protected]>
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 docker#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 <[email protected]>
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 <[email protected]>
Signed-off-by: Victor Vieux <[email protected]>
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 <[email protected]>

Adding back comment in isSecureIndex

Signed-off-by: Don Kjer <[email protected]>
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 <[email protected]>
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 <[email protected]> (github: estesp)
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 <[email protected]> (github: estesp)
Signed-off-by: Tomáš Hrčka <[email protected]>

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <[email protected]> (github: jfrazelle)
Signed-off-by: Antonio Murdaca <[email protected]>
ehazlett and others added 2 commits May 15, 2017 11:57
This adds support to specify custom container paths for secrets.

Signed-off-by: Evan Hazlett <[email protected]>
@vdemeester vdemeester force-pushed the opts-from-docker branch 2 times, most recently from 0de7beb to 8fd1bc8 Compare May 15, 2017 12:14
@vdemeester vdemeester changed the title Opts from docker Import opts package from docker May 15, 2017
@vdemeester vdemeester changed the title Import opts package from docker Import opts package from moby/moby May 15, 2017
Also, rename a bunch of variable to not *shadow* the `opts` package
name.

Signed-off-by: Vincent Demeester <[email protected]>
Copy link
Collaborator

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix github.com/docker/docker/registry/config.go so it doesn't import docker/docker/opts. That will allow us to remove the package from vendor.

The cli flags should be added from this repo, not from some random package.

That will have to wait until after this PR.

LGTM

@vdemeester
Copy link
Collaborator Author

yep I'll handle registry/config.go after 👼 (in docker/docker)

@mlaventure
Copy link
Contributor

💚 🎉

@mlaventure mlaventure merged commit 36e557f into docker:master May 15, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.06.0 milestone May 15, 2017
@vdemeester vdemeester deleted the opts-from-docker branch May 15, 2017 18:59
nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
Static Dev builds should include date and sha
Upstream-commit: 015af2c71e77fb99a9882301828bf8eafe4b95df
Component: packaging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.