Tonis Tiigi
c0371c908f
client: avoid string formatting on custom vertex names
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-22 15:35:39 -08:00
Wei Fu
2a7287a189
dockerfile2llb/pipe: remove the useless assignment
...
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2018-11-28 19:44:53 +08:00
Tonis Tiigi
c840e7967f
dockerfile: avoid urls in context filter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-18 12:36:26 -08:00
Tonis Tiigi
ec2ab81a3b
dockerfile: update copy source repo
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-06 11:14:59 -08:00
Akihiro Suda
03d15c8ff2
bump up tonistiigi/copy to v0.1.9
...
Fix #704 (CoreOS xattr issue)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-31 13:30:26 +09:00
Tõnis Tiigi
85935a3d1e
Merge pull request #661 from tiborvass/dockerfile-shell-only-envvar
...
dockerfile: RUN's CustomName no longer consume quotes and only replaces environment variables if set
2018-10-29 11:04:07 -07:00
Tonis Tiigi
945e100a8c
dockerfile: disable network for copy
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-22 13:23:10 -07:00
Tonis Tiigi
af8b839283
dockerfile: fix empty dest directory panic
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-11 11:24:02 -07:00
Tonis Tiigi
2f8c7667d8
dockerfile: wrap reference parse error
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-08 23:15:10 -07:00
Tonis Tiigi
48ec136f1b
dockerfile: update default copy image
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-05 14:35:33 -07:00
Tibor Vass
b9859b2d49
dockerfile: RUN's CustomName no longer consume quotes and only replaces environment variables if set
...
```
FROM alpine
RUN echo "Hey $name"
```
When building the above Dockerfile, the RUN command used to show: `echo Hey `
With this patch it now shows `echo "Hey $name"`.
However, because it is very useful for debugging to see the values variables can take,
they are expanded if set.
```
FROM alpine
ENV name=Jude
RUN echo "Hey $name"
```
Building the above Dockerfile makes the RUN command show: `echo "Hey Jude"`.
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-10-03 02:41:51 +00:00
Tibor Vass
38198bd5c3
dockerfile: substitute build args in addition to env vars in RUN's CustomName
...
Example Dockerfile:
FROM busybox
ARG foo=abc
ENV bar=def
RUN echo $foo $bar $baz
Output without fix:
#5 [2/2] RUN echo def
#5 digest: sha256:647df948c9689163efaf92b24b38779bc9f8b350482ecc3de3533f86a544c196
#5 name: "[2/2] RUN echo def "
#5 started: 2018-09-29 19:01:11.376665368 +0000 UTC
#5 0.764 abc def
#5 completed: 2018-09-29 19:01:12.320141054 +0000 UTC
#5 duration: 943.475686ms
Output with fix:
#5 [2/2] RUN echo abc def
#5 digest: sha256:647df948c9689163efaf92b24b38779bc9f8b350482ecc3de3533f86a544c196
#5 name: "[2/2] RUN echo abc def "
#5 started: 2018-09-29 19:01:11.376665368 +0000 UTC
#5 0.764 abc def
#5 completed: 2018-09-29 19:01:12.320141054 +0000 UTC
#5 duration: 943.475686ms
Signed-off-by: Tibor Vass <tibor@docker.com>
2018-09-29 19:07:01 +00:00
Tonis Tiigi
25bfc57e9e
dockerfile: add test for chown destination
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-25 23:10:17 -07:00
Tonis Tiigi
f6e104da5f
gateway: allow access to apicaps
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-21 15:33:41 -07:00
Tonis Tiigi
7615f02078
dockerfile: avoid detecting schema1 configs as empty
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-19 14:09:37 -07:00
Tonis Tiigi
3938aebdfc
llb: make sure to use stable marshaler
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 15:19:04 -07:00
Tonis Tiigi
705b5f0a4a
dockerfile: fix command count & platform for scratch stages
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 13:42:25 -07:00
Tonis Tiigi
9c6eb52a84
dockerfile: avoid duplicate config resolve lines
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 13:42:21 -07:00
Tonis Tiigi
c1d0aa7c5a
dockerfile: set default PATH for arg replacement
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-11 12:15:44 -07:00
Kunal Kushwaha
98c1f44151
function name fixed SetMarhalDefaults -> SetMarshalDefaults
...
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-09-06 13:28:39 +09:00
Tonis Tiigi
372528a565
dockerfile: update copy helper to v0.1.4
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-31 14:44:08 -07:00
Tonis Tiigi
3eda0516da
dockerfile: allow overriding copy image
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-30 13:21:52 -07:00
Tonis Tiigi
38569b9b9a
dockerfile: never use entrypoint for run commands
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-27 17:48:18 -07:00
Tonis Tiigi
4963ed7ea4
dockerfile: fix quoting of meta args
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-27 09:39:55 -07:00
Tonis Tiigi
95e0348f57
dockerfile: enable global net-mode settings
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-09 14:03:40 -07:00
Tonis Tiigi
f8b0573edb
dockerfile: expose add-hosts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-03 13:56:14 -07:00
Tonis Tiigi
04a5cc81e8
dockerfile: add platform prefixes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -07:00
Tonis Tiigi
d0aafaefd0
dockerfile: add stage prefixes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:36 -07:00
Tonis Tiigi
4c44d2c6e4
dockerfile: custom names to vertexes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-31 10:41:30 -07:00
Tonis Tiigi
489246dd28
cache: support for internal/frontend record type
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:54:53 -07:00
Tonis Tiigi
b966096ab5
dockerfile: allow setting image resolve mode
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:23:59 -07:00
Tonis Tiigi
9f5e5c7dc7
metaresolver: refactor to option struct and resolvemode
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 18:22:15 -07:00
Tonis Tiigi
6be1257f5d
export: manifest list support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -07:00
Tonis Tiigi
69bb8e8a15
dockerfile: allow automatic platform variables
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:05 -07:00
Yuichiro Kaneko
08a5847eff
Split resolving platform codes to `buildPlatformOpt`
...
This will make it easy to test these functions.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-24 08:46:32 +09:00
Yuichiro Kaneko
85987b10ee
Rename `toEnvList` to `toEnvMap`
...
Because `toEnvList` was changed to return map.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-21 08:30:47 +09:00
Yuichiro Kaneko
80e2176450
Omit needless argument `override`
...
It always called with `override = true`.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:46:50 +09:00
Yuichiro Kaneko
936aa64061
Use `ProcessWord(s)WithMap` to avoid string contatination and string split
...
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:41:15 +09:00
Yuichiro Kaneko
83dc829222
Extract parsing logic of "key=val" as `parseKeyValue`
...
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 21:36:07 +09:00
Yuichiro Kaneko
fb499edc5b
Omit needless argument `commit` from `dispatchEnv`
...
Always `dispatchEnv` is called `commit` with `true`.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 21:38:37 +09:00
Yuichiro Kaneko
5838f9e763
Simplify `State` setup
...
On this code `dispatchEnv` is called with `commit = false`,
so this call do these 2 things
* `AddEnv` to `d.state`
* `addEnv` to update `d.image.Config.Env`
But updating `d.image.Config.Env` has no effect on `d.image.Config.Env`
because this is in for-loop of `range d.image.Config.Env`.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 21:29:55 +09:00
Yuichiro Kaneko
c9038a2f5d
Use `ProcessWordWithMap` in simple cases
...
In the case when the second argument of `toEnvList` is `nil`,
we can use `ProcessWordWithMap` and avoid string contatination
and string split.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 08:54:18 +09:00
Yuichiro Kaneko
c641b43e4a
Use simple `KeyValuePairOptional` to `dispatchOpt.metaArgs` and `dispatchState.buildArgs`
...
`KeyValuePairOptional` is enough in this case. We can avoid create `ArgCommand` out of Parser
by replacing them with `KeyValuePairOptional`.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-10 19:24:43 +09:00
Yuichiro Kaneko
30c27cd6bf
Return an error when copying from url
...
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 20:28:08 +09:00
Yuichiro Kaneko
b8bf5d0da9
Refactoring `toCommand` and `detectRunMount` to only depend to `dispatchStates`
...
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 07:38:34 +09:00
Yuichiro Kaneko
0d5c12363a
Introduce `dispatchStates` type
...
`dispatchStates` manages a collection of `dispatchState`.
By `dispatchStates`, we can aggregate how to find `dispatchState`
in one place and `dispatchStatesByName` local variable in `Dockerfile2LLB`
can be removed.
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 07:36:07 +09:00
Tõnis Tiigi
3b9737dd5a
Merge pull request #470 from yui-knk/ensure_arg_is_not_blank
...
Ensure BaseName of Stage is not blank
2018-06-28 10:32:11 -07:00
Yuichiro Kaneko
813575f62a
Ensure BaseName of Stage is not blank
...
Related: https://github.com/moby/moby/issues/37325
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-06-28 20:21:41 +09:00
Akihiro Suda
cce2080ddb
Merge pull request #468 from tonistiigi/update-containerd
...
vendor: update containerd to 08f7ee982
2018-06-27 14:37:47 +09:00
Tonis Tiigi
97abda7528
dockerfile: use manifest list copy image
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-06-26 21:22:32 -07:00