Граф коммитов

133 Коммитов

Автор SHA1 Сообщение Дата
Tibor Vass 50ff27caa1 Merge pull request #9826 from icecrime/8318_whitespace_add_copy
Support whitespace in paths for ADD and COPY
2015-01-19 18:37:53 -05:00
Jessie Frazelle 640e0fc578 Merge pull request #9881 from tianon/json-array-of-strings
Adjust builder to validate that JSON in Dockerfiles are arrays of strings and nothing else to match how we describe them to people (and what all our existing tests already assumed)
2015-01-14 17:13:51 -08:00
Tibor Vass 3183af8b19 builder: use len() > 0 instead of != nil
Signed-off-by: Tibor Vass <teabee89@gmail.com>
2015-01-14 16:55:56 -08:00
Erik Hollensbe 39343b8618 Fix a panic where RUN [] would be supplied.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-14 16:55:56 -08:00
Alexander Morozov 99a15ec8bd Merge pull request #9973 from duglin/Issue9880
Make sure that ADD/COPY still populate the cache even if they don't use it
2015-01-13 11:17:34 -08:00
Doug Davis 32cde64c04 Merge pull request #9980 from erikh/parser-with-no-command
Fix a parser error where an empty RUN statement would cause a panic
2015-01-08 19:34:06 -05:00
Don Kjer 568f86eb18 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>
2015-01-08 20:14:58 +00:00
Erik Hollensbe 09e3467452 Fix a parser error where an empty RUN statement would cause a panic
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2015-01-08 11:30:08 -08:00
Doug Davis 6f20b957b0 Make sure that ADD/COPY still populate the cache even if they don't use it
Closes #9880

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-08 06:56:30 -08:00
Doug Davis eb3ea3b43c Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 16:33:26 -08:00
Doug Davis 6d801a3caa Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 10:57:48 -08:00
Tianon Gravi 05c2d2db9a Adjust builder to validate that JSON in Dockerfiles are arrays of strings and nothing else to match how we describe them to people (and what all our existing tests already assumed)
This also adds more tests to help verify this, including unicode and nonprintable characters (hence the earlier commit switching to strconv.Quote).

As a bonus, this fixes a subtle bug where [] was turned into [""] and then turned back into [] (and thus [""] was impossible to actually round-trip correctly in a Dockerfile).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-05 14:31:05 -07:00
Doug Davis 04ee071692 Modify MAINTAINERS per erikh's suggestion
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-05 10:28:36 -08:00
Tianon Gravi f6cb1ea85a Simplify builder TestTestData slightly by using ioutil.ReadFile instead of os.Open+ioutil.ReadAll
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-02 22:38:52 -07:00
Tianon Gravi 1edf16e977 Simplify builder ast.Dump by using strconv.Quote instead of a custom QuoteString function (the only change to existing files is literal tabs becoming \t, but future files may use nonprintable characters and the like now)
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-01-02 22:36:58 -07:00
Seongyeol Lim abfb713887 Add support file name with whitespace for ADD and COPY command
Closes #8318

Signed-off-by: Seongyeol Lim <seongyeol37@gmail.com>
2014-12-26 16:28:03 -08:00
Josh Hawn 8936789919 Make `FROM scratch` a special cased 'no-base' spec
There has been a lot of discussion (issues 4242 and 5262) about making
`FROM scratch` either a special case or making `FROM` optional, implying
starting from an empty file system.

This patch makes the build command `FROM scratch` special cased from now on
and if used does not pull/set the the initial layer of the build to the ancient
image ID (511136ea..) but instead marks the build as having no base image. The
next command in the dockerfile will create an image with a parent image ID of "".
This means every image ever can now use one fewer layer!

This also makes the image name `scratch` a reserved name by the TagStore. You
will not be able to tag an image with this name from now on. If any users
currently have an image tagged as `scratch`, they will still be able to use that
image, but will not be able to tag a new image with that name.

Goodbye '511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158',
it was nice knowing you.

Fixes #4242

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2014-12-18 14:03:38 -08:00
Doug Davis f21f9f856e Allow for relative paths on ADD/COPY
Moved Tianon's PR from: https://github.com/docker/docker/pull/7870
on top of the latest code

Closes: #3936

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-12-18 05:13:04 -08:00
Arnaud Porterie a76f7c6ec3 Merge pull request #9122 from dqminh/debug-huge-expose
Expose a large number of ports should not slow down builder
2014-12-16 10:03:31 -08:00
Aleksa Sarai 916cba9c58 builder: internals: fix incomplete chown walk when fixing permissions
This patch fixes the permission fixing code used by addContext, which
would not be responsible for Lchown-ing top-level directories added to a
destination that didn't exist prior to untar-ing the context.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
2014-12-12 06:07:16 +11:00
Arnaud Porterie cfc24769a2 Fix permissions on ADD/COPY
Fix a regression introduced in PR#9467 when a single file was added or
copied.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-12-10 11:09:03 -08:00
Alexandr Morozov a62cbdeb47 Use Set for stderr "logs" job in builder
Because engine implicitly adds his stder to job stderr

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-12-09 19:08:24 -08:00
Arnaud Porterie f3cedce360 Reduce permissions changes scope after ADD/COPY
Permissions after an ADD or COPY build instructions are now restricted
to the scope of files potentially modified by the operation rather than
the entire impacted tree.

Fixes #9401.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2014-12-04 17:16:22 -08:00
Tibor Vass e6ec703df3 Merge pull request #9323 from unclejack/merge_release_v1.3.2
Merge release v1.3.2 to master
2014-11-24 19:26:36 -05:00
Michael Crosby 5794b5373e Update code for use of urlutil pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-24 18:47:42 -05:00
Tibor Vass 9c01bc249d pkg/chrootarchive: pass TarOptions via CLI arg
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	graph/load.go
		fixed conflict in imports
2014-11-25 01:03:40 +02:00
unclejack 1cb17f03d0 add pkg/chrootarchive and use it on the daemon
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)

Conflicts:
	builder/internals.go
	daemon/graphdriver/aufs/aufs.go
	daemon/volumes.go
		fixed conflicts in imports
2014-11-25 01:03:40 +02:00
unclejack 054e57a622 build: add pull flag to force image pulling
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2014-11-21 19:59:44 +02:00
Doug Davis 1314e1586f Add support for ENV of the form: ENV name=value ...
still supports the old form: ENV name value

Also, fixed an issue with the parser where it would ignore lines
at the end of the Dockerfile that ended with \

Closes #2333

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-20 09:54:28 -08:00
John Gossman e45b0f9271 Remove unused sysinfo parameter to runconfig.Parse
Removing dead code.

Signed-off-by: John Gossman <johngos@microsoft.com>
2014-11-14 18:20:54 -08:00
Hans Rødtang b4336803f3 Updated cover tool import path.
Signed-off-by: Hans Rødtang <hansrodtang@gmail.com>
2014-11-14 06:16:41 +01:00
Daniel, Dao Quang Minh 87d0562c61 expose sorts its ports before saving as comment
Saving ports as `map[nat.Port]struct{}` directly has ordering issue which is
more replicatable where we expose a huge number of ports at the same time. As a
result, the cache will be burst whenever the map order is different from the
previous build.
This sorts the ports first and save them as a whitespace-separated list instead
of the map representation, so the order will always be consistent if the port
list isnt changed.

NOTICE: this will burst the old expose caches

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-11-12 09:14:35 -05:00
Daniel, Dao Quang Minh 3aae63f452 speed up creation of args and msg for huge cmds
Whenever a command arguments is formed by a large linked list, repeatedly
appending to arguments and displayed messages took a long time because go will
have to allocate/copy a lot of times.

This speeds up the allocation by preallocate arrays of correct size for args
and msg

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-11-12 00:04:45 -05:00
Erik Hollensbe 0b4132782a Merge pull request #9048 from coaku/b_xzk_rm_redundant_trim
Remove redundant stripComment
2014-11-10 21:53:22 -08:00
xuzhaokui 6c79ee7d1e Remove the redundant stripComment.
Signed-off-by: xuzhaokui <cynicholas@gmail.com>
2014-11-09 23:07:44 +08:00
Doug Davis 2e482c86bc Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
2014-11-07 13:58:05 -08:00
Jessie Frazelle 9cc71b4597 Merge pull request #8468 from laktek/master
Fix URL check in build from Git.
2014-10-31 14:43:21 -07:00
Erik Hollensbe 24545c18c3 builder: Restore /bin/sh handling in CMD when entrypoint is specified with JSON
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-27 21:50:22 +00:00
Erik Hollensbe 4e74cd498b builder: whitelist verbs useful for environment replacement.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-27 17:38:25 +00:00
Erik Hollensbe be49867cab builder: handle escapes without swallowing all of them.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-27 17:38:24 +00:00
Jessie Frazelle 15b6b7be01 Merge pull request #8770 from LK4D4/logrus_support
Logrus support
2014-10-27 09:05:24 -07:00
Lakshan Perera d3ac9ea98e Add HasValidGITPrefix to utils/utils.go
This will allow us to use a common Git prefix check for both api/clients/commands.go and
builder/job.go. Previous prefix check in build from Git (in builder/jobs.go) ignored valid prefixes such as "git@", "http://" or "https://".

Signed-off-by: Lakshan Perera <lakshan@laktek.com>
2014-10-26 03:25:25 +00:00
Alexandr Morozov 7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Erik Hollensbe cdd6e97910 builder: some small fixups + fix a bug where empty entrypoints would not override inheritance.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-24 00:23:25 +00:00
Sven Dowideit bb3e33154d Merge pull request #8673 from SvenDowideit/whats-docker-version
DOCKER_VERSION and docker-version havn't been implemented.
2014-10-22 19:03:54 -07:00
Erik Hollensbe a34831f016 builder: handle cases where onbuild is not uppercase.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-21 20:17:37 +00:00
Sven Dowideit 6ed610fb80 DOCKER_VERSION and docker-version havn't been implemented.
So far, it looks like the declarations are not used, and so its safer not to
confuse people into thinking they do something.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
2014-10-21 16:04:11 +10:00
Michael Crosby b90ab68f2a Merge pull request #8511 from coolljt0725/fix_tag
Fix tag an existed tag name of a repository
2014-10-20 14:32:23 -07:00
Alexandr Morozov 75fd1b614d Merge pull request #8639 from erikh/fix_escapes
builder: fix escaping for ENV variables.
2014-10-17 15:50:37 -07:00
Erik Hollensbe df0e0c7683 builder: fix escaping for ENV variables.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-10-17 21:47:35 +00:00