Commit Graph

311 Commits

Author SHA1 Message Date
295c5cdefd Windows: Nice error on ARG (builder)
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b69c13b1a643911a541c251b22b4a440197e5f7d
Component: engine
2015-09-21 14:54:15 -07:00
3904dd3167 Move api/errors/ to errors/
Per @calavera's suggestion: https://github.com/docker/docker/pull/16355#issuecomment-141139220

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a283a30fb026aad4434a9f2e34f7ce955d27a957
Component: engine
2015-09-17 11:54:14 -07:00
0203472d5b Merge pull request #15898 from Microsoft/15775-buildcontextfix
Windows: Fix long path handling for docker build
Upstream-commit: cfd3080a8004738c34ecf1ae0e6cd2f82638c78b
Component: engine
2015-09-17 09:19:23 -07:00
ded3de600a Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 54240f8da9992880e20a1508e9a6f0e59f2adef1
Component: engine
2015-09-16 03:31:15 -07:00
965c460a95 Windows: Fix long path handling for docker build
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: 9b648dfac6453de5944ee4bb749115d85a253a05
Component: engine
2015-09-15 10:58:11 -07:00
700bfcfe4a Merge pull request #15069 from duglin/UseErrorPackage
Use the new error package
Upstream-commit: e91f2c26ce38787e159162d2c4a43744396e3308
Component: engine
2015-09-15 09:28:53 -04:00
bb8ff26c08 Use the new error package
This is the first step in converting out static strings into well-defined
error types.  This shows just a few examples of it to get a feel for how things
will look. Once we agree on the basic outline we can then work on converting
the rest of the code over.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 628b9a41b09fde3ce1493f7d4f1495b9afaa506c
Component: engine
2015-09-14 13:11:01 -07:00
81f0877adb Windows: Nice error on stopsignal
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8de7fcaf7e9b0c6e99ddd09021e8a746a68a8e63
Component: engine
2015-09-11 09:40:23 -07:00
1e38e54eff Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3781cde61ff10b1d9114ae5b4c5c1d1b2c20a1ee
Component: engine
2015-09-10 19:56:05 -04:00
1f9dd04dfa Merge pull request #15877 from Microsoft/10662-trigger
Fix trigger count and output
Upstream-commit: 0009852cb0ceadc398c9d30c7f5494848004c20f
Component: engine
2015-09-03 20:04:05 -07:00
bbd3497cdd Fix trigger count and output
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 662010292619c33db7f144890abfdd9a99b423e0
Component: engine
2015-09-03 17:39:19 -07:00
1e6fd6c910 Merge pull request #16027 from Microsoft/10662-utimes
Windows: Fix dockerfile ADD from HTTP
Upstream-commit: 6ffbea3c94ea4b3f6177dff3e7dc40e4c67dc9f4
Component: engine
2015-09-03 18:44:34 -04:00
c264fc5ef8 Windows: Fix HTTP download directory
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 7beb026f0e981df484363ae017d43c8167c80a6e
Component: engine
2015-09-02 16:24:53 -07:00
c4fcb79000 Windows: Fix dockerfile ADD from HTTP
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3715e60c71abbcc794a9ec9f95e06d7a5ae5ee30
Component: engine
2015-09-02 13:53:09 -07:00
49e7160994 Windows: Fix absolute checks
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 49c1b51ae22e54edc2e13f3195583e47b987fc15
Component: engine
2015-09-01 08:41:37 -07:00
6190aee4a2 abstract the string slice struct to stringutils package
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: ea4a06740b6d4579f77507c1d7e0897a870fd72d
Component: engine
2015-08-29 01:08:40 +08:00
5850f3450f Builder counts from 1
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 17d6c6c7e514d6cea0820c6e81924413e9416cad
Component: engine
2015-08-26 10:05:04 -07:00
b498641d47 Merge pull request #14665 from coolljt0725/fix_build_with_resource_limit
Fix build with resource limit which system not support.
Upstream-commit: 6f8c4480e4f99b08c84d25f1611d6b12ee646066
Component: engine
2015-08-25 16:42:13 +02:00
49eee7cf68 Add some builder getEnv tests
In particular I want to make sure that calling getEnv() when the same
var name appears more than once in the env list that we only pick up
the first one.  PR #15182 counts on this

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: eeeae2c235f0f075284008cced669de177dd8747
Component: engine
2015-08-22 13:12:43 -07:00
a9c24d4837 integration-cli: add a integration test to avoid parsing null string in ADD, COPY and VOLUME to nil slice
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
Upstream-commit: d45fcc6c80bd67ee6a06821fd64cad029d3a756f
Component: engine
2015-08-19 11:11:46 +09:00
8728d5d064 builder: avoid decoding "null" string in ADD, COPY and VOLUME step to nil slice
Signed-off-by: Soshi Katsuta <katsuta_soshi@cyberagent.co.jp>
Upstream-commit: 2d6952e8a52168f7204fc6834e6f5d28a5b21a37
Component: engine
2015-08-18 21:15:57 +09:00
6442b64e6e Fix build with resource limit which system is not support.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 770daa15f359ddc7329a2a031332c251e5a53a29
Component: engine
2015-08-18 11:54:00 +08:00
d9d9dff9a7 Merge pull request #15579 from Microsoft/10662-graph
Windows: Graph remove custom interface, add central store
Upstream-commit: 2e7b088164960b7981a058f34336c05dc52f2c53
Component: engine
2015-08-17 10:45:48 -07:00
73f39654a9 Windows: Graph remove custom interface and add central store
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>

Windows: add support for images stored in alternate location.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: dfbb5520e3b35030f3eef38d5a2d86ad20ea0a2f
Component: engine
2015-08-14 23:45:53 -07:00
49c0f6d3fb Windows: Block 'FROM scratch'
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6df6e2e405a08bac2a81639349bc9a20c6014619
Component: engine
2015-08-14 18:17:19 -07:00
880ecdb34d Windows: Stop commit on running container
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4b933dd2eaae17e4931b7414e3cead370124ec5a
Component: engine
2015-08-13 22:17:03 -07:00
0baccb159d Windows: Error on unsupported builder command
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 394ccfac0782d9877b430b5c7ef75374edcb94e8
Component: engine
2015-08-12 10:02:23 -07:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
87c1161542 Just add some code doc around the use of AddXXX func to avoid any confusion
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 592908c0f5dbad90205764002d7b0079ad18b7a4
Component: engine
2015-08-07 08:07:27 -07:00
761b152e62 Fix uses of "int" where "int64" should be used instead
Some structures use int for sizes and UNIX timestamps. On some
platforms, int is 32 bits, so this can lead to the year 2038 issues and
overflows when dealing with large containers or layers.

Consistently use int64 to store sizes and UNIX timestamps in
api/types/types.go. Update related to code accordingly (i.e.
strconv.FormatInt instead of strconv.Itoa).

Use int64 in progressreader package to avoid integer overflow when
dealing with large quantities. Update related code accordingly.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1f61084d83aea37b212468aaa975020094b7f7c9
Component: engine
2015-07-31 16:31:40 -07:00
59df5a01ec make docker compile on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
Upstream-commit: 26c03d561ab126287bb3034cc23477d18869a888
Component: engine
2015-07-29 21:25:56 +03:00
3d5c90498b Merge pull request #14759 from vdemeester/pkg-golint
golint on some pkg/* packages
Upstream-commit: 25c42cc0d0a83325817e5fdb8fa654c9e5ab54d5
Component: engine
2015-07-27 15:19:46 -07:00
2db54e3ac2 Lint on pkg/* packages
- pkg/useragent
- pkg/units
- pkg/ulimit
- pkg/truncindex
- pkg/timeoutconn
- pkg/term
- pkg/tarsum
- pkg/tailfile
- pkg/systemd
- pkg/stringutils
- pkg/stringid
- pkg/streamformatter
- pkg/sockets
- pkg/signal
- pkg/proxy
- pkg/progressreader
- pkg/pools
- pkg/plugins
- pkg/pidfile
- pkg/parsers
- pkg/parsers/filters
- pkg/parsers/kernel
- pkg/parsers/operatingsystem

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 18c7c67308bd4a24a41028e63c2603bb74eac85e
Component: engine
2015-07-27 21:26:21 +02:00
b61648e148 Lint fixes on runconfig
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5170a2c096ff64d4bfbe0fab296ec6777c412bc3
Component: engine
2015-07-27 21:23:15 +02:00
Lei
b278b668e9 Add ulimit to docker build.
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 877dbbbde8aaf6583a81d9946e4c83db8e356b1a
Component: engine
2015-07-23 10:26:06 +08:00
43c8d7a97f Fix golint warnings for builder
Addresses: #14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 8c4a282a5719455cb5c63b917deb2a2042eed685
Component: engine
2015-07-22 13:29:03 +08:00
b70343dc2b Fixing Image struct to no longer use Graph.
Signed-off-by:  John Howard <jhoward@microsoft.com>
Upstream-commit: 9001ea26e7821239207586ad23c78c67d6926bfc
Component: engine
2015-07-20 13:59:53 -07:00
371476f565 fix 8926: rmi dangling is unsafe when pulling
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 1b67c38f6f4a709e1d159445b56f0beee8cfad3a
Component: engine
2015-07-17 11:39:57 -04:00
4f73cb3ecd Cleanup build tmp dir stuff
If there's an error while unpacking the build context then we weren't erasing
the tmp dir created to persist the context.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 13c08b898b1ad26dda2900c90314afa0bd2d3a1f
Component: engine
2015-07-15 06:23:19 -07:00
737b8d4b0e Windows: Fix builder
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2ceb1146078f900a686019398a94d113943beeb9
Component: engine
2015-07-12 09:06:18 -07:00
e92413dd0d Merge pull request #14371 from Microsoft/10662-graphdriver
Windows: Graph driver implementation
Upstream-commit: 4aeb84612f530d01e0b4f5b3fff40d2a6978f6f4
Component: engine
2015-07-10 15:35:00 -07:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
5b5bcdcb21 Align 'docker commit' docs with the code
It was missing some variants and 'maintainer' isn't actually supported.
Also sorted the list of allowed cmds in the code just to make it easier
to diff with the docs.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0bf0e5a6efb6d4718f18db11084295aaba2062e3
Component: engine
2015-07-09 13:17:47 -07:00
576b04d570 Merge pull request #13744 from turtlebender/feature/whitelist-label-for-commit
Support LABEL as change for `docker commit`
Upstream-commit: 53b897ce9c1f815a047682edb4ca54baea395a64
Component: engine
2015-07-01 10:57:33 -07:00
9161e24479 Move /nat to /pkg/nat
By convention /pkg is safe to use from outside the docker tree, for example
if you're building a docker orchestrator.

/nat currently doesn't have any dependencies outside of /pkg, so it seems
reasonable to move it there.

This rename was performed with:

```
gomvpkg -vcs_mv_cmd="git mv {{.Src}} {{.Dst}}" \
	-from github.com/docker/docker/nat \
        -to   github.com/docker/docker/pkg/nat

```

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 9c2374d19623581028f070bc93fa4c60a660dce4
Component: engine
2015-06-30 17:43:17 +01:00
a8c9aef74e Merge pull request #14061 from runcom/clean-builder-daemon-config
Add struct to configure Builder commit
Upstream-commit: d543a01e17ace181261dd7809bbeec0c6580b867
Component: engine
2015-06-29 11:04:05 -07:00
3c4d6e026e Merge pull request #14139 from jlhawn/fix_build_with_auth
[api, builder] Fix build auth config
Upstream-commit: dd408891baff5cd820f917a001364add35f5f878
Component: engine
2015-06-25 17:39:36 -07:00
aa8bc7e1e7 [api, builder] Fix build auth config
With the 1.7 release, we introduced a change to how we store registry
credentials, but the build API endpoint did not expect a change in the format
of that file. This patch fixes this problem so that you can again pull private
images during `docker build`.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 02c7bbefb8841e5e86a4b9d467defa668e3ea613
Component: engine
2015-06-23 12:58:17 -07:00
9a58f60656 Merge pull request #13833 from Microsoft/10662-dockerbuild
Windows: Start docker build working
Upstream-commit: d5721f03854f33300f84186554321c3371a28319
Component: engine
2015-06-23 11:46:56 -07:00
4992f31e42 Merge pull request #14071 from mavenugo/mhnet
Vendoring libnetwork 83743db8ceb2bdbfa0960d9a54ed2f98df4ea846
Upstream-commit: f39b9a0b0f77c528a6fb8bf14be5cdea11ce338d
Component: engine
2015-06-22 08:35:18 -07:00