Commit Graph

222 Commits

Author SHA1 Message Date
cc66f7a04e Merge pull request #12502 from calavera/shallow_git_history
Shallow clone using git to build images.
Upstream-commit: 790c63a5ef34d54ae8ba79886b6c8daae547bf25
Component: engine
2015-04-24 10:16:01 -07:00
dfd9ef2b64 Remove duplicated git clone logic.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1cfb307d70558110e8e88a7391ae0e6cf6ebf174
Component: engine
2015-04-24 09:39:45 -07:00
44cdfe63b1 Test that we set the right arguments for git cloning depending on the transport.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3117bf3ef562bc43ef007d8afe3815c58aac6e85
Component: engine
2015-04-24 09:39:38 -07:00
d5b0b24bb8 Do not try to shallow git history when the protocol doesn't allow it.
This only happens with the old git http dumb protocol, but that's what we use in our integration tests.
We check the Content-Type header advertised in http requests to make sure the http transport is the git smart transport:

See this commit as a reference:
4656bf47fc

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9fb7204a41804131c2492f9d50d7451e123a05e5
Component: engine
2015-04-24 09:39:38 -07:00
3c2cab11aa Shallow clone using git to build images.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 36fbf4b86469ca6fe3677d47c9a1976bcdd111e4
Component: engine
2015-04-24 09:39:38 -07:00
734115a06e Add cpu cfs quota to build
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 5f4fb8be006c0ffeff2671e5752111e543e07d9f
Component: engine
2015-04-24 08:54:08 +08:00
c8f1332dce Move CLI config processing out from under registry dir
No logic changes should be in here, just moving things around.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: bb9da6ba9294a8eab8f4dfaf7cf07c57959fe608
Component: engine
2015-04-23 10:18:38 -07:00
43e79cc411 Remove chain of engine passing from builder to loadManifest
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: a2f74aa4b449479dc3953b129c839ca90b089494
Component: engine
2015-04-21 14:55:23 -07:00
16569396d9 Remove engine.Job from builder.CmdBuildConfig.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: ae4063585e7936780154101f7fe416a080c6ff7c
Component: engine
2015-04-20 13:37:06 -07:00
a618f11507 Remove engine.Job references from builder.CmdBuild
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 9a2c00975123c17033ac7b50762af82051ec73db
Component: engine
2015-04-20 13:37:04 -07:00
d6cf7ae01f Merge pull request #12009 from duglin/AddConfig
Migrate .dockercfg to .docker/config.json and support for HTTP Headers
Upstream-commit: 08ef006d178b7a869c9dfc05c8b887316a856445
Component: engine
2015-04-20 13:12:17 -07:00
44c88b9112 Add .docker/config.json and support for HTTP Headers
This PR does the following:
- migrated ~/.dockerfg to ~/.docker/config.json. The data is migrated
  but the old file remains in case its needed
- moves the auth json in that fie into an "auth" property so we can add new
  top-level properties w/o messing with the auth stuff
- adds support for an HttpHeaders property in ~/.docker/config.json
  which adds these http headers to all msgs from the cli

In a follow-on PR I'll move the config file process out from under
"registry" since it not specific to that any more. I didn't do it here
because I wanted the diff to be smaller so people can make sure I didn't
break/miss any auth code during my edits.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 18c9b6c6455f116ae59cde8544413b3d7d294a5e
Component: engine
2015-04-20 13:05:24 -07:00
6f3b598444 Merge pull request #12453 from runcom/style-minor-fixes
Add minor stylistic fixes
Upstream-commit: a7690076c955d242b4590fcf557f15e1029d0c8b
Component: engine
2015-04-20 11:51:04 -07:00
14bae8f05b Merge pull request #12358 from ZJU-SEL/remove_job_from_tag
remove job from tag
Upstream-commit: b1d8ae3824d2902c86d63837b8d413952b546d62
Component: engine
2015-04-19 16:02:28 -04:00
dd5f4141fe remove job from tag
Signed-off-by: Simei He <hesimei@zju.edu.cn>
Upstream-commit: 99f6309b97041bf82cc845340734dc8e47977c8a
Component: engine
2015-04-19 18:36:56 +08:00
41c63ff3d3 Merge pull request #12490 from LK4D4/carry_12396
remove job from pull and import
Upstream-commit: 055c6dbaefc61c597164aaedee4448bc32522b2e
Component: engine
2015-04-17 15:26:30 -04:00
0ff275f7b4 remove job from pull and import
Closes #12396

Signed-off-by: Simei He <hesimei@zju.edu.cn>

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6e38a53f96403b4cbd38e49e6b294128ed054a20
Component: engine
2015-04-17 09:55:02 -07:00
47592700e5 Add minor stylistic fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 1c89c6ea2f34f51a05215279c9cdefca30bb13b1
Component: engine
2015-04-16 21:22:32 +02:00
884bdce09a Merge pull request #12253 from calavera/remove_job_from_start_and_create
Remove engine.Job from Start and Create
Upstream-commit: de923f59b3860eba2c87e8a533b385ac5752243b
Component: engine
2015-04-15 21:49:25 -04:00
234898b4e7 Decode container configurations into typed structures.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 767df67e3149b83255db0809f6543b449a4f652e
Component: engine
2015-04-15 10:22:07 -07:00
9f222f171d Add cpuset-mems support for docker build
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: f8dc7e8754355c504562021da244c52055ab9204
Component: engine
2015-04-15 09:34:12 +08:00
a4111cba55 Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c30a55f14dbbe3971ba0ac716ba69a60868f4490
Component: engine
2015-04-14 01:37:36 +02:00
b7982a6499 Fix a typo in comment of parseMaybeJSONToList
Signed-off-by: Yu Changchun <yuchangchun1@huawei.com>
Upstream-commit: 24dd8a4698315a4aafee5071f4fe4d74fa06c377
Component: engine
2015-04-11 10:34:21 +08:00
95c63c4203 Fix typo in builder/dispatchers.go
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: bbdf045ac1dfa8fc78b1c932736fe6400eecdf63
Component: engine
2015-04-09 11:43:05 -07:00
49e191d0e4 Remove engine usage from attach
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: c44f513248a8b40b1b2221726c7441881383e919
Component: engine
2015-04-07 14:23:09 -07:00
088a52cbda Merge pull request #11149 from duglin/8667-AdvancedVars
Add support for advanced ${} uses
Upstream-commit: 9707286a5cecde3eee3c83e3c2da65df8e59d04e
Component: engine
2015-04-02 08:25:49 -04:00
3e035d76a2 Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 39908fc6d9a13f0d44196475ba938b6cc352fdbe
Component: engine
2015-04-01 08:11:15 -07:00
753b8ae08c Remove jobs from registry.Service
This makes `registry.Service` a first class type and does not use jobs
to interact with this type.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 03d3d79b2b3f8b720fff2d649aff0ef791cff417
Component: engine
2015-03-31 16:38:04 -07:00
0544f5e034 Fix error from daemon no such image even when the image exist
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 013fb87543a47524efba3c371a1d22afe151287c
Component: engine
2015-03-28 09:07:20 +08:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
0ee1e9f604 Fixes hacks from progressreader refactor
related to #10959

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
Upstream-commit: 0cd6c05d8112e9246b734107d54e2855e3d5fec5
Component: engine
2015-03-25 18:21:02 -07:00
a16f3d6cb4 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c79b9bab541673af121d829ebc3b29ff1b01efa2
Component: engine
2015-03-25 22:32:08 +01:00
d4497c7a2b .: remove trailing white spaces
blame tibor this one ;-)
```
find . -type f -not -name '*.png' -not -name '*.go' -not -name '*.md'
-not -name '*.tar' -not -name '*.pem' -not -path './vendor/*' -not -path
'./.git/*' -not -path '*/testdata/*' -not -path './docs/*images*' -not
-path '*/testfiles/*' -not -path './bundles/*' -not -path
'./docs/*static*/*' -not -path './docs/*article-img/*' -exec grep -HnEl
'[[:space:]]$' {} \; | xargs sed -iE 's/[[:space:]]*$//'
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 7617ec176d266650b19c2378ccab4aa41e6dc5a2
Component: engine
2015-03-25 13:38:17 -04:00
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
925b84807a Merge pull request #11657 from GeorgeMac/cleanup-redundant-else
#11602 - Cleanup redundant else statements find via golint 
Upstream-commit: 92f9e2d3955fcc3341407809c9db33ac702e1508
Component: engine
2015-03-23 18:27:29 -05:00
9e396b31ce Merge pull request #11658 from 4gh/doc_package_builder
Add builder/evaluator comments for the package in godoc-style
Upstream-commit: 9f894c93e40cda8177febe71cd3c17d4b7613659
Component: engine
2015-03-23 14:27:23 -07:00
835a16cc1d Add builder/evaluator comments for the package in godoc-style
fixes #11617

Signed-off-by: Frank Herrmann <fgh@4gh.tv>
Upstream-commit: a0cd0045282f21215d7845a987ec6292aa92a685
Component: engine
2015-03-23 20:56:03 +00:00
0221549820 Cleanup redundant else statements find via golint #11602
Signed-off-by: George MacRorie <gmacr31@gmail.com>
Upstream-commit: 664ef0cbe2113e8307135e656cc6db9199f8268e
Component: engine
2015-03-23 20:40:29 +00:00
9b9105b3b2 Remove hardcoded error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 8b02d85e1728b48729b2fb8553b2ec4b56a30d37
Component: engine
2015-03-23 20:58:16 +01:00
69bd180001 Merge pull request #10431 from duglin/Issue10391
Clarify ENV non-recursivenes w.r.t. env var substitution + fix escaping
Upstream-commit: 61966d281bb715a2359b27bcd30d0d59c98d2812
Component: engine
2015-03-23 13:30:11 -05:00
9dcfa784ef Merge pull request #11538 from duglin/EmptyVolume
Check volume path to make sure its not the empty string
Upstream-commit: ded0ada9b47ab48b57d14225ec663e3756faff7f
Component: engine
2015-03-22 19:25:50 -07:00
7c1bfa9093 Implement build cancellation
Add the capability to cancel the build by disconnecting the client.

This adds a `cancelled` channel which is used to signal that a build
should halt. The build is halted by sending a Kill signal and noticing
that the cancellation channel is closed.

This first pass implementation does not allow cancellation during a
pull, but that will come in a subsequent PR.

* Add documentation of cancellation to cli and API

* Protect job cancellation with sync.Once

* Add TestBuildCancelationKillsSleep

* Add test case for build cancellation of RUN statements.

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 671c12204cb469d868f646da1474d5bad6541770
Component: engine
2015-03-22 11:31:28 +00:00
bafff954ca Check volume path to make sure its not the empty string
With this Dockerfile
```
FROM ubuntu
ENV ABC=""
VOLUME $ABC
```

It builds ok but then at run time I get this error:

FATA[0002] Error response from daemon: Cannot start container 8902b4a7aaf5c4e4b11a38070d392db465fa97ad88c91c8b38dda5ab8149ccac: [8] System error: no such file or directory

Because the Volume config shows "" as the path.  This PR checks for "" as
the path and stops it at build time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8071bf396747d3ad01db504a417b75fe7a52608a
Component: engine
2015-03-20 21:39:49 -07:00
490a18c994 Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes #10391

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6d66e3e7a5ecb021a9e89c4f85fadecf23e2000c
Component: engine
2015-03-20 20:09:00 -07:00
5e80a64076 Allow setting resource constrains for build
Closes #10191

Allow `docker build` to set --cpu-shares, --cpuset, --memory,
--memory-swap for all containers created by the build.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e6ae89a45a699bd44f03517396777e34ec76018b
Component: engine
2015-03-18 20:57:13 -04:00
ad61919ab6 Some fixed for new LABEL stuff
- command.Commands was missing "Label"
- used the correct error string in dispatcher when LABEL has no args, otherwise
  the test TestBuildMissingArgs will not work
- removed the premature error msg in line_parser that was blocking the
  label() func in dispatcher from showing the err msg in previous bullet
- since LABEL uses the env parser it needs to be added to the replaceEnvAllowed
  list so that proper quote processing will be done.  Especially once
  PR #10431 is merged.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6784a772baaa20936f00b8adc00a4b4444356181
Component: engine
2015-03-16 22:53:41 -07:00
5f00f97ea0 Merge pull request #9882 from ibuildthecloud/labels
Proposal: One Meta Data to Rule Them All => Labels
Upstream-commit: b6ac111abfbed628a80b67f0b092a248083b354c
Component: engine
2015-03-16 20:20:05 -07:00
7a404617a3 Merge pull request #11402 from miminar/err-cleanup
Error formatting cleanups
Upstream-commit: 88f437d6c619f7b07a22cb5750814bce4d8d7164
Component: engine
2015-03-16 16:13:16 -07:00
526e8c6e31 Merge pull request #10591 from duglin/ErrUnknownCmd
Generate an error on unknown Dockerfile instruction
Upstream-commit: 085054db9d8850a7d2c8658bb9a7fdacf7a3ceb8
Component: engine
2015-03-16 17:47:28 -04:00
2479608ad5 Merge pull request #10977 from robertabbott/10959-progressreader
Moves progressreader from utils to its own package
Upstream-commit: 8ae20d8eba127361bc07260580e2d3b8e3628c3e
Component: engine
2015-03-16 12:45:33 -07:00