Commit Graph

40 Commits

Author SHA1 Message Date
98bb6eba72 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)
Upstream-commit: 8936789919c5c8004f346f44a3452d1521818b60
Component: engine
2014-12-18 14:03:38 -08:00
a9b8d39261 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>
Upstream-commit: f21f9f856e9d5af23521f131799028c2e67c04ed
Component: engine
2014-12-18 05:13:04 -08:00
c0c6361cf0 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)
Upstream-commit: 916cba9c587a3f3ce97b407993fecd96ac2fecaf
Component: engine
2014-12-12 06:07:16 +11:00
5231d38261 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>
Upstream-commit: cfc24769a26e825e4267cbfdd59af807e27508b9
Component: engine
2014-12-10 11:09:03 -08:00
3ecd658560 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>
Upstream-commit: a62cbdeb47e5e504e670c546ad8bec45e696f370
Component: engine
2014-12-09 19:08:24 -08:00
15957abc33 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>
Upstream-commit: f3cedce3608afe7bd570666a7fc878ab85c7bc03
Component: engine
2014-12-04 17:16:22 -08:00
ed716fd8a8 Merge pull request #9323 from unclejack/merge_release_v1.3.2
Merge release v1.3.2 to master
Upstream-commit: e6ec703df31f04c3ea3a6aeb19881494a6ae58ae
Component: engine
2014-11-24 19:26:36 -05:00
033a9598e5 Update code for use of urlutil pkg
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 5794b5373ef26846b3cc5e48e651208771d12b19
Component: engine
2014-11-24 18:47:42 -05:00
9d0c84c559 pkg/chrootarchive: pass TarOptions via CLI arg
Signed-off-by: Tibor Vass <teabee89@gmail.com>

Conflicts:
	graph/load.go
		fixed conflict in imports
Upstream-commit: 9c01bc249dc628280f3fc019d5f0e0ace71be248
Component: engine
2014-11-25 01:03:40 +02:00
dd4a9e5429 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
Upstream-commit: 1cb17f03d0b217acf2d2c289b4946d367f9d3e80
Component: engine
2014-11-25 01:03:40 +02:00
2f7c6a8c08 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>
Upstream-commit: 2e482c86bc14ddd4cfa45281dcf8f9ca141c9f14
Component: engine
2014-11-07 13:58:05 -08:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
1ccc013586 Use logs instead of attach for builder
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 6f09d064bd438ab4425d6105f40887f02bb9e97e
Component: engine
2014-10-17 13:20:02 -07:00
3381602232 builder: ONBUILD triggers were not accurately being executed in JSON cases.
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 1150c1639a9efbd2e5e4ac1e71961aef77a32de0
Component: engine
2014-10-14 01:59:45 +00:00
afe8e130e0 Move archive package into pkg/archive
Now that the archive package does not depend on any docker-specific
packages, only those in pkg and vendor, it can be safely moved into pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
Upstream-commit: 30d5a42c1f24e26f681b7330249f04fec891aee9
Component: engine
2014-09-29 23:23:36 -07:00
3ffb3fc6cc Move Go() promise-like func from utils to pkg/promise
This is the first of two steps to break the archive package's dependence
on utils so that archive may be moved into pkg.  Also, the `Go()`
function is small, concise, and not specific to the docker internals, so
it is a good candidate for pkg.

Signed-off-by: Rafe Colton <rafael.colton@gmail.com>
Upstream-commit: b845a62149d5f4990462ac6c9167c5cfaa0e66cb
Component: engine
2014-09-29 23:16:27 -07:00
3ecb3c4d7a Merge pull request #8230 from duglin/Issue6820
add wildcard support to COPY/ADD (part 2 of issue #6820)
Upstream-commit: 1cd6135972bda50f913315910baba1b17d097338
Component: engine
2014-09-29 11:19:01 -07:00
fbb83ba5bc add wildcard support to copy/add
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: acd40d50799a117c4e7c318abdbc8c14b9eb1632
Component: engine
2014-09-25 20:44:51 -07:00
8b12ac14d7 API: Provide the HostConfig during "run".
Currently, the HostConfig is only passed from the CLI to Docker only
when issuing a docker create, but not when doing a docker run.

In the near future, in order to allocate ports at creation time rather
than start time, we will need to have the HostConfig readily available
at container creation.

This PR makes the client always pass the HostConfig when creating a
container (regardless of whether it's for a run or create).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 1df87b95066198c30312147393c18e0be0564fd0
Component: engine
2014-09-25 15:24:38 -07:00
3c0e9292e2 Merge pull request #8186 from duglin/ErrInCopyCache
Make sure COPY/ADD on dirs doesn't grab too many files
Upstream-commit: 81a643211bbd88545d21550defc9cd7e3f8437bd
Component: engine
2014-09-23 15:16:57 -07:00
c65c43b413 Make sure COPY/ADD on dirs doesn't grab too many files
Add check for / first - per LK4D4's comment.
Add a comment to explain why we're adding a /

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: cd329d062bddaffcfea3ac0cd3245c0be5bf5542
Component: engine
2014-09-23 14:16:00 -07:00
e73a233371 builder: properly communicate onbuild trigger information during
subsequent builds.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 8edacc673a0ecb4320377457f0bf9dbdaa08f843
Component: engine
2014-09-23 13:55:51 -07:00
1ce355084d Split volumes out from daemon
Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 45407cf00af95b04dd2ff11ce330dd397bf1e095
Component: engine
2014-09-19 17:47:47 -05:00
55b8ec78cc Add support for copy/add with multiple src files
Part one of solution for issue #6820

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 05b8a1eb363ce03a9dfa3315fbac59c42af2df54
Component: engine
2014-09-18 20:12:13 -07:00
b0b8a2773b tarsum: name collision fix
If a tar were constructed with duplicate file names, then depending on
the order, it could result in same tarsum.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: c5e6362c53cbbc09ddbabd5a7323e04438b57d31
Component: engine
2014-09-17 14:37:46 -04:00
a11625614e Adding support for docker exec in daemon.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 5130fe5d38837302e72bdc5e4bd1f5fa1df72c7f
Component: engine
2014-09-15 16:57:52 +00:00
f867da582c Adding Exec method to native execdriver.
Modified Attach() method to support docker exec.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: f3c767d798f945192d32441cf624bdd54e746b74
Component: engine
2014-09-15 16:57:52 +00:00
3fd5e4c058 Merge pull request #7983 from vbatts/vbatts-tarsum_switch_names
tarsum: TarSum should be the interface
Upstream-commit: 23f490427f80f6b48f19767cbebb10ddff6997f3
Component: engine
2014-09-12 17:01:35 -04:00
d8ce78da21 Do not populate path to prevent runconfig merge conflict; remove
autoConfig seeding of entrypoint.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 92f885d7bd9d4a8f5d30ec650a7625a8727d952e
Component: engine
2014-09-11 06:00:24 -07:00
76991d395e builder: Fix entrypoint and cmd semantics in evaluator. Test c/o @cnf
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ac107995ae4a24195f8bb6b70c26393a87d19982
Component: engine
2014-09-11 06:00:24 -07:00
4dcbf56012 tarsum: TarSum is not the interface
don't export the exsisting TarSum struct and call the interface 'TarSum'
instead.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: ec01eb653db9d5e5b9291c1670dde57e7f742874
Component: engine
2014-09-10 21:56:20 -04:00
5f275ccb1b TarSum: versioning
This introduces Versions for TarSum checksums.
Fixes: https://github.com/docker/docker/issues/7526

It preserves current functionality and abstracts the interface for
future flexibility of hashing algorithms. As a POC, the VersionDev
Tarsum does not include the mtime in the checksum calculation, and would
solve https://github.com/docker/docker/issues/7387 though this is not a
settled Version is subject to change until a version number is assigned.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 747f89cd327db9d50251b17797c4d825162226d0
Component: engine
2014-09-10 15:41:52 -04:00
ca58c61a83 Merge pull request #7759 from unclejack/pull_latest_by_default
make docker pull only the latest tag by default
Upstream-commit: 85314e7e58a17cf3ebc4b29511b3399cd758b1ae
Component: engine
2014-09-08 13:43:21 -07:00
78de9287f3 Fix race between dispatchers.run and toDisk
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: f17410da5e4b5fa0e0dd2614f9b6e00dbcf66da6
Component: engine
2014-09-04 19:43:28 +04:00
e883336648 docker build: pull just latest if tag uspecified
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 6ba5d67a51d96e6c2923227c99ee049bbf8e5f50
Component: engine
2014-09-03 18:32:47 +03:00
ba6779868a Add a progress bar for ADD <url> <dst>
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 4e40d09a2b13c1f7886783fa66b9fdfeb5369375
Component: engine
2014-09-03 00:17:08 +00:00
13e3017817 Use State as embedded to Container
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: e0339d4b88989a31b72be02582eee72433d2f0ec
Component: engine
2014-09-03 00:01:11 +04:00
5c6641e945 builder: Refactors according to @tiborvass's comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 2ef1dec7e8d405f237b68ca104d457d78b8caed1
Component: engine
2014-08-27 18:52:30 -07:00
4308bf42dd builder: several fixups from comments
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 305f73508022d0a3af65faa327aa798610969875
Component: engine
2014-08-27 18:52:30 -07:00
8812387cab builder: move the evaluator package code directly into builder
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: a1522ec01c21807e657e840760a8186f482f2271
Component: engine
2014-08-27 18:52:30 -07:00