1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

199 commits

Author SHA1 Message Date
David Calavera
bbdf045ac1 Fix typo in builder/dispatchers.go
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-04-09 11:43:05 -07:00
Alexander Morozov
c44f513248 Remove engine usage from attach
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-07 14:23:09 -07:00
Tibor Vass
9707286a5c Merge pull request from duglin/8667-AdvancedVars
Add support for advanced ${} uses
2015-04-02 08:25:49 -04:00
Doug Davis
39908fc6d9 Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-01 08:11:15 -07:00
Michael Crosby
03d3d79b2b 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>
2015-03-31 16:38:04 -07:00
Lei Jitang
013fb87543 Fix error from daemon no such image even when the image exist
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-03-28 09:07:20 +08:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
bobby abbott
0cd6c05d81 Fixes hacks from progressreader refactor
related to 

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-25 18:21:02 -07:00
Antonio Murdaca
c79b9bab54 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-25 22:32:08 +01:00
Vincent Batts
7617ec176d .: 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>
2015-03-25 13:38:17 -04:00
Antonio Murdaca
b80fae7356 Refactor pkg/common, Fixes
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-24 18:19:59 +01:00
Tibor Vass
92f9e2d395 Merge pull request from GeorgeMac/cleanup-redundant-else
 - Cleanup redundant else statements find via golint
2015-03-23 18:27:29 -05:00
Alexander Morozov
9f894c93e4 Merge pull request from 4gh/doc_package_builder
Add builder/evaluator comments for the package in godoc-style
2015-03-23 14:27:23 -07:00
Frank Herrmann
a0cd004528 Add builder/evaluator comments for the package in godoc-style
fixes 

Signed-off-by: Frank Herrmann <fgh@4gh.tv>
2015-03-23 20:56:03 +00:00
George MacRorie
664ef0cbe2 Cleanup redundant else statements find via golint
Signed-off-by: George MacRorie <gmacr31@gmail.com>
2015-03-23 20:40:29 +00:00
Antonio Murdaca
8b02d85e17 Remove hardcoded error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-23 20:58:16 +01:00
Tibor Vass
61966d281b Merge pull request from duglin/Issue10391
Clarify ENV non-recursivenes w.r.t. env var substitution + fix escaping
2015-03-23 13:30:11 -05:00
Arnaud Porterie
ded0ada9b4 Merge pull request from duglin/EmptyVolume
Check volume path to make sure its not the empty string
2015-03-22 19:25:50 -07:00
Peter Waller
671c12204c 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>
2015-03-22 11:31:28 +00:00
Doug Davis
8071bf3967 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>
2015-03-20 21:39:49 -07:00
Doug Davis
6d66e3e7a5 Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes 

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-20 20:09:00 -07:00
Brian Goff
e6ae89a45a Allow setting resource constrains for build
Closes 

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>
2015-03-18 20:57:13 -04:00
Doug Davis
6784a772ba 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  is merged.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-16 22:53:41 -07:00
Arnaud Porterie
b6ac111abf Merge pull request from ibuildthecloud/labels
Proposal: One Meta Data to Rule Them All => Labels
2015-03-16 20:20:05 -07:00
Michael Crosby
88f437d6c6 Merge pull request from miminar/err-cleanup
Error formatting cleanups
2015-03-16 16:13:16 -07:00
Tibor Vass
085054db9d Merge pull request from duglin/ErrUnknownCmd
Generate an error on unknown Dockerfile instruction
2015-03-16 17:47:28 -04:00
Alexander Morozov
8ae20d8eba Merge pull request from robertabbott/10959-progressreader
Moves progressreader from utils to its own package
2015-03-16 12:45:33 -07:00
Michal Minar
210ab030bc Format error by value
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.

Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-16 12:05:53 +01:00
Doug Davis
8a5b50d65d Generate an error on unknown Dockerfile instruction
Instead of just printing a warning and going on, this will generate
an error and stop processing.

This used to be part of  but I decided it might need its own
independent discussion/PR as to not derail .

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-13 16:08:34 -07:00
Dan Walsh
cdfdfbfb62 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-03-13 09:47:09 -07:00
Doug Davis
645f8a32df Fix builder when num of RUN args is 1
FROM scratch
ADD echo /
RUN [ "echo" ]

will die with
  exec: "/bin/sh": stat /bin/sh: no such file or directory

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-11 07:30:44 -07:00
bobby abbott
12b278d354 Remove import to utils in progressreader
Added method in StreamFormatter to handle calls
from progressreader. Solves 

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-03-11 00:50:27 -07:00
Sebastiaan van Stijn
9e63b0d0f9 cleanup: simplify parser_test
parser_test only needed the directory-names for
the tests to run. This replaces f.Readdir() with
f.Readdirnames() to only return the names.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-03-10 00:55:00 +01:00
Alexander Morozov
c5f9aa18f4 Merge pull request from icecrime/remove_maintainers_files
Remove subdirectories MAINTAINERS files
2015-03-09 09:02:58 -07:00
Arnaud Porterie
89bdaa35e0 Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00
Chen Hanxiao
26e85b0db1 dispatchers: warn user if try to use EXPOSE ip:hostPort:containerPort
We could use EXPOSE ip:hostPort:containerPort,
but actually it did as EXPOSE ::containerPort

commit 2275c833 already warned user on daemon side.
This patch will print warning message on client side.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-03-04 21:09:50 -05:00
Alexander Morozov
e0823b09ec Merge pull request from anandkumarpatel/invalidate-probe
Improve build speed
2015-03-04 11:35:00 -08:00
Doug Davis
15924f2385 Support dockerfile and Dockerfile
Closes 

Adds support for `dockerfile` ONLY when `Dockerfile` can't be found.
If we're building from a Dockerfile via stdin/URL then always download
it a `Dockerfile` and ignore the -f flag.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-03-03 18:38:50 -08:00
AnandkumarPatel
1a5ea50aa8 Remove comment and b.UtilizeCache check.
Signed-off-by: AnandkumarPatel <anandkumarpatel@gmail.com>
2015-02-25 14:04:35 -08:00
AnandkumarPatel
2420c1f03b Add cacheBusted flag which gets set on the first cache miss
Refactor of probeCache function

Signed-off-by: AnandkumarPatel <anandkumarpatel@gmail.com>
2015-02-25 10:27:32 -08:00
AnandkumarPatel
1e746a8a2b Set UtilizeCache to false on cache miss
Signed-off-by: Anandkumar Patel <anandkumarpatel@gmail.com>

Signed-off-by: AnandkumarPatel <anandkumarpatel@gmail.com>
2015-02-24 18:29:26 -08:00
Dan Walsh
17abfc3ddc pass --change changes to the import job
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-02-24 13:01:36 -05:00
Michael Crosby
3210d13fc8 Return error on invalid --change command
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Docker-DCO-1.1-Signed-off-by: Michael Crosby <crosbymichael@gmail.com> (github: rhatdan)
2015-02-24 13:01:35 -05:00
Dan Walsh
7f091eca70 build_config job: parse dockerfile ast into config
Instead of building the actual image, `build_config` will serialize a subset of
dockerfile ast into *runconfig.Config

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
2015-02-24 13:01:35 -05:00
Jessie Frazelle
ac06d0c46a Merge pull request from duglin/FixNonverboseBuild
Build w/o verbose hangs w/RUN
2015-02-23 15:15:12 -08:00
Srini Brahmaroutu
7a9c944b82 Removing dependencies from pkg into Docker internal code
Closes 

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-02-23 18:43:10 +00:00
Rik Nijessen
ba93f8316c Rename Destroy to Rm to be consistent with CLI.
Signed-off-by: Rik Nijessen <riknijessen@gmail.com>
2015-02-23 16:15:56 +01:00
Doug Davis
92c353582c Build w/o verbose hangs w/RUN
`docker build -q .` where Dockerfile contains a RUN cmd will hang on the
RUN. It waits for the output stream to close but because of -q we never
attached to the container and end up waiting forever.

The fact that no one noticed this tells me that people may not actually
use -q and if so I wonder if it would make sense to make -q work the may
it does for other commands (like `docker ps`) and make it so it only
shows the container ID at the end.  A -q/quiet option that only hides the
container RUN output apparently isn't really that useful since no one is
using it.  See: https://github.com/docker/docker/issues/4094

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-02-20 13:38:03 -08:00
kargakis
6ecf23861e Map Commands instead of using them as a slice
The most obvious use case is when one wants to make sure as fast
as possible that a command is a valid Dockerfile command.

Signed-off-by: kargakis <kargakis@users.noreply.github.com>
2015-02-20 15:56:21 +01:00
Ahmet Alp Balkan
72a070c5da builder/parser: Make use of builder/command
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-02-11 23:54:41 -08:00