Daniel Nephin
f7f101d57e
Add gosimple linter
...
Update gometalinter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-12 12:09:59 -04:00
Daniel Nephin
09652bf878
Add ineffassign linter
...
Also enable GC in linting to reduce memory usage.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-08 18:23:21 -04:00
Yong Tang
cb952bf006
Merge pull request #34625 from dnephin/more-linters
...
Add interfacer and unconvert linters
2017-09-01 08:46:08 -07:00
Tõnis Tiigi
a1183dda57
Merge pull request #34263 from estesp/chown-flag-add-copy
...
Add --chown flag to ADD/COPY commands
2017-08-28 09:50:44 -07:00
Daniel Nephin
e62b2d410c
Move ErrorContains to an internal package.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-25 12:04:58 -04:00
Daniel Nephin
2f5f0af3fd
Add unconvert linter
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-24 15:08:31 -04:00
Daniel Nephin
709bf8b7bc
Add interfacer linter
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-24 15:08:26 -04:00
Daniel Nephin
60672382c7
Update tests to use gotestyourself/fs
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-23 17:25:00 -04:00
Victor Vieux
59e1565565
Merge pull request #34600 from dnephin/remove-pkg-testutil
...
Remove pkg/testutil/utils.go
2017-08-23 09:38:20 -07:00
Stephen J Day
ae8dbeaeed
*: normalize the use of normalize
...
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-08-22 15:25:31 -07:00
Daniel Nephin
4f304e72a2
Remove testutil.ReadBody
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-22 17:15:26 -04:00
Phil Estes
19a29f6fcf
Rebase --chown function for ADD/COPY
...
Rebases and completes initial PR for (prior: --user) --chown flag for
ADD/COPY commands in Dockerfile.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-08-22 13:39:25 -04:00
Daniel Nephin
9b47b7b151
Fix golint errors.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-18 14:23:44 -04:00
John Howard
9fa449064c
LCOW: WORKDIR correct handling
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-08-17 15:29:17 -07:00
Brian Goff
ebcb7d6b40
Remove string checking in API error handling
...
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.
Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-15 16:01:11 -04:00
John Howard
8af4db6f00
Merge pull request #34272 from dmcgowan/update-logrus
...
Update logrus to v1.0.1 (Sirupsen -> sirupsen)
2017-08-01 18:53:33 -07:00
Yong Tang
f7d09a0a9b
Merge pull request #33704 from ecnerwala/33701-shallow-clone
...
Fix shallow git clone in docker-build
2017-08-01 10:17:08 -07:00
Derek McGowan
1009e6a40b
Update logrus to v1.0.1
...
Fixes case sensitivity issue
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-07-31 13:16:46 -07:00
Tibor Vass
41445a4745
Remove client/session package, depend on buildkit's session package
...
gofmt -w -r '"github.com/docker/docker/client/session" -> "github.com/moby/buildkit/session"'
gofmt -w -r '"github.com/docker/docker/client/session/filesync" -> "github.com/moby/buildkit/session/filesync"'
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-07-28 16:34:23 -07:00
Andrew He
85afbbc2ed
Fix shallow git clone in docker-build
...
If the HEAD request fails, use a GET request to properly test if git
server is smart-http.
Signed-off-by: Andrew He <he.andrew.mail@gmail.com>
2017-07-25 13:20:59 -07:00
Kara Alexandra
858fad3795
Add --chown flag to Dockerfile ADD and COPY
...
Rebased by @estesp
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-07-24 16:25:04 -04:00
allencloud
87b4dc2002
return prune data when context canceled
...
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-10 10:06:24 +08:00
Sebastiaan van Stijn
19ee873616
Merge pull request #33859 from tonistiigi/session-includepaths
...
Add path filtering to build session client
2017-07-05 18:21:48 -07:00
Josh Soref
39bcaee47b
Spelling fixes
...
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify
Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-03 13:13:09 -07:00
Brian Goff
e066edcfcf
Merge pull request #33860 from lixiaobing1/masterFclose
...
add f.Close() after dockerignore.ReadAll(f) before return err
2017-06-29 10:19:45 -04:00
lixiaobing10051267
3072fce067
add f.Close() after dockerignore.ReadAll(f) before return err
...
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-29 00:51:31 -07:00
Sebastiaan van Stijn
b7ac1571a3
Merge pull request #33851 from tonistiigi/fix-add-remote
...
build: fix add from remote url
2017-06-28 23:53:21 -07:00
Tonis Tiigi
ad46348d7c
builder: enable path filtering for filesync session
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-28 09:12:30 -07:00
John Howard
950d472c9c
Merge pull request #33826 from Microsoft/jjh/lcownits
...
LCOW: Fix nits from 33241
2017-06-27 22:56:38 -07:00
John Howard
4ec9766a27
LCOW: Fix nits from 33241
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-27 11:59:49 -07:00
Tonis Tiigi
2981667e11
build: fix add from remote url
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-27 10:38:01 -07:00
Sebastiaan van Stijn
d3d1aabcc6
Move IsGitTransport() to gitutils
...
This function was only used inside gitutils,
and is written specifically for the requirements
there.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-26 10:07:04 -07:00
Sebastiaan van Stijn
913eb99fdc
Fix handling of remote "git@" notation
...
`docker build` accepts remote repositories
using either the `git://` notation, or `git@`.
Docker attempted to parse both as an URL, however,
`git@` is not an URL, but an argument to `git clone`.
Go 1.7 silently ignored this, and managed to
extract the needed information from these
remotes, however, Go 1.8 does a more strict
validation, and invalidated these.
This patch adds a different path for `git@` remotes,
to prevent them from being handled as URL (and
invalidated).
A test is also added, because there were no
tests for handling of `git@` remotes.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-26 10:02:12 -07:00
Daniel Nephin
b47b375cb8
Add a test for warning on empty continuation lines.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-23 13:15:04 -04:00
Yong Tang
7815c8f875
Warn/deprecate continuing on empty lines in Dockerfile
...
This fix is related to 29005 and 24693. Currently in `Dockerfile`
empty lines will continue as long as there is line escape before.
This may cause some issues. The issue in 24693 is an example.
A non-empty line after an empty line might be considered to be a
separate instruction by many users. However, it is actually part
of the last instruction under the current `Dockerfile` parsing
rule.
This fix is an effort to reduce the confusion around the parsing
of `Dockerfile`. Even though this fix does not change the behavior
of the `Dockerfile` parsing, it tries to deprecate the empty line
continuation and present a warning for the user. In this case,
at least it prompt users to check for the Dockerfile and avoid
the confusion if possible.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-23 13:04:40 -04:00
Tonis Tiigi
5c3d2d552b
Implement incremental file sync using client session
...
Also exposes shared cache and garbage collection/prune
for the source data.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-22 11:52:35 -07:00
Tonis Tiigi
ec7b6238c3
Add long-running client session endpoint
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-22 11:22:41 -07:00
John Stephens
930e689668
Merge pull request #33241 from Microsoft/jjh/multi-layerstore
...
LCOW: Support most operations excluding remote filesystem
2017-06-21 15:45:23 -07:00
John Howard
fe7b4d8fcd
LCOW: Set correct default shell for platform in builder
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:54:33 -07:00
John Howard
3a09b56a10
LCOW: Rework after 33454 merged which refactored daemon/builder interface
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:13 -07:00
John Howard
f154588226
LCOW: OCI Spec and Environment for container start
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:50:11 -07:00
John Howard
ba40132366
LCOW: Fix ImageCache to address right store
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:53 -07:00
John Howard
08252bc963
LCOW: Builder plumbing
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:53 -07:00
John Howard
8f53780694
LCOW: commit to use image platform, not host
...
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-06-20 19:49:52 -07:00
Tonis Tiigi
c268d9da4b
builder: fix copy —from conflict with force pull
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-20 15:45:33 -07:00
Vincent Demeester
99c72eb268
Merge pull request #33454 from dnephin/refactor-builder-remove-copy-on-build
...
[Builder] Move file coping from the daemon to the builder
2017-06-20 10:12:57 +02:00
Vincent Demeester
c21c17c642
Merge pull request #32088 from simonferquel/windows-dockerignore-fix
...
Fix behavior of absolute paths in .dockerignore
2017-06-13 13:36:39 +02:00
Daniel Nephin
5136096520
Fix copy when used with scratch and images with empty RootFS
...
Commit the rwLayer to get the correct DiffID
Refacator copy in thebuilder
move more code into exportImage
cleanup some windows tests
Release the newly commited layer.
Set the imageID on the buildStage after exporting a new image.
Move archiver to BuildManager.
Have ReleaseableLayer.Commit return a layer
and store the Image from exportImage in the local imageSources cache
Remove NewChild from image interface.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-08 15:07:16 -04:00
Daniel Nephin
ecd44d23cc
Rename LazyContext to LazySource.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-08 15:07:15 -04:00
Daniel Nephin
bd5f92d263
Remove CopyOnBuild from the daemon.
...
Add CreateImage() to the daemon
Refactor daemon.Comit() and expose a Image.NewChild()
Update copy to use IDMappings.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-06-08 15:06:54 -04:00