Commit Graph

447 Commits (b0d37376274788db03d9d7f69089dc938b95eaa7)

Author SHA1 Message Date
Tõnis Tiigi e0f5c984dd
Merge pull request #898 from chendave/deprecated2
Stop using the deprecated flag "--frontend-opt" for build
2019-03-20 22:43:16 -07:00
Dave Chen 28c9923fc1 Stop using the deprecated flag "--frontend-opt" for build
This patch replace "--frontend-opt" to "--opt" for the place
where it is appliable.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-03-20 19:04:14 -07:00
Tibor Vass 9e8dfa72d3
Merge pull request #885 from tonistiigi/content-gc
content: fix setting wrong gc labels on config query
2019-03-20 18:52:41 -07:00
Dave Chen c7ac2f392a Stop using the deprecated way for build
Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-03-19 19:01:31 -07:00
Tonis Tiigi 2dc7a133a2 content: fix setting wrong gc labels on config query
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-18 12:00:09 -07:00
Akihiro Suda a67ba78d9e
Merge pull request #809 from tonistiigi/fileop
llb: fileop implementation
2019-03-18 10:07:10 +09:00
Akihiro Suda cd89a8ce3d go 1.12
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-03-17 04:38:23 +09:00
Tonis Tiigi 5effbff314 dockerfile: improve symlinks copy tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tibor Vass 6fd30e7b43 dockerfile: add more tests to fix fileop
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi c6149da2eb fileop: review fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi f38d971b95 dockerfile: add matrix testing for non-fileop versions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 637bec7196 dockerfile: make fileop default
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi c57e5b22ea dockerfile: add regression test for wildcard cache
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi c4ef668f62 dockerfile: regression test for existing dest dir perms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 369f7482de dockerfile: regression test for wildcard unpack
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 39ba2ede04 dockerfile: regression test for workdir creation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi bb11c8c5c9 dockerfile: empty wildcard regression test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 0d17ac323e fileop: updates with new fsutil copy pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:58 -07:00
Tonis Tiigi 8a4674bab4 fileop: add dockerfile support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-15 17:49:50 -07:00
Akihiro Suda 5c9f7b8ff0 buildctl: new CLI ("Option C+")
See https://github.com/moby/buildkit/pull/807#issuecomment-468146089

Close #774

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-03-06 13:20:21 +09:00
Tonis Tiigi 62697a93f7 dockerfile: allow custom context names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-23 09:12:54 -08:00
Tibor Vass 175506ff7f hack: update scripts to be go mod compatible
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-01-31 22:44:47 +00:00
Tõnis Tiigi 7679d6fa7d
Merge pull request #795 from tonistiigi/fmt-fix
client: avoid string formatting on custom vertex names
2019-01-23 08:30:08 -08:00
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
Tonis Tiigi 03a2f79561 gateway: allow frontends without network
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-21 19:38:07 -08:00
Tonis Tiigi db3db1033d dockerfile: ensure metadata commands have created time
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-18 11:14:45 -08:00
Akihiro Suda 6e7617e889 support local cache exporter and importer
Export:

  $ buildctl build ... --export-cache type=local,store=/path/to/output-dir

Import:

  $ buildctl build ... --import-cache type=local,store=/path/to/input-dir

Impact on CLI:
* Old (deprecated but still effective): `--export-cache localhost:5000/myrepo:buildcache --export-cache-opt mode=max`
* New: `--export-cache type=registry,ref=localhost:5000/myrepo:buildcache,mode=max`

Impact on API:
* New fields are added to control.proto and gateway.proto. The daemon
internally translates old API calls to the new ones.
* While new API can be used for `registry` caches, the client continues
to use the legacy API for `registry` caches to ensure compatibility with
old daemons.
* To import `local` caches with a frontend, the frontend needs to support
a new frontend opt `cache-imports`.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-01-19 02:38:26 +09:00
Tõnis Tiigi 34ff9c2366
Merge pull request #771 from LinuxMercedes/error-on-empty-dockerfile
Have parser error on dockerfiles without instructions
2019-01-04 16:33:08 -08:00
linuxmercedes 2ec7d53b00 Parser errors on dockerfiles without instructions
See https://github.com/moby/moby/pull/38487 for more discussion.

Signed-off-by: Natasha Jarus <linuxmercedes@gmail.com>
2019-01-04 13:44:52 -06:00
Tonis Tiigi b521aae3ea dockerfile: allow setting file mode/uid for secrets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-03 11:13:40 -08:00
Tonis Tiigi 2529762ae7 dockerfile: allow setting file mode/uid for ssh socket
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-01-03 11:13:34 -08:00
Tonis Tiigi 3926820e3a update dockerfile repo location
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-12-03 11:06:17 +01: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 2e3058e62c dockerfile: allow symlinks on reading Dockerfile
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-20 18:15:41 -08:00
Tibor Vass bf8c057e68
Merge pull request #727 from tonistiigi/add-fix
dockerfile: avoid urls in context filter
2018-11-20 16:47:31 -08:00
Tonis Tiigi b3e4cdf0d8 dockerfile: document more mount options
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-19 10:10:10 -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 9d3426d94f dockerfile: update image refs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-11-07 17:51:02 -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 b5003d53eb update docs
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-11-01 16:17:26 +09: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 134e126aab dockerfile: add daily feature releases
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-23 22:43:21 -07:00
Tõnis Tiigi 50b36877f5
Merge pull request #695 from tonistiigi/dockerfile-release
dockerfile: add release tag deployments
2018-10-22 17:41:12 -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 918ee1988a dockerfile: add release tag deployments
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-17 14:11:09 -07:00
Tonis Tiigi 4c3050a26c dockerfile: setup master release deployment
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-16 21:01:33 -07:00
Akihiro Suda 0d80bd17a3
Merge pull request #687 from tonistiigi/dockerfile-testing
dockerfile: add testing external dockerfile features
2018-10-16 15:58:55 +09:00
Tonis Tiigi 12513ba394 dockerfile: remove dfextall build tag
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:13 -07:00
Tonis Tiigi 74754d6a6a dockerfile: add example mount test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:13 -07:00
Tonis Tiigi 706fa2556a dockerfile: add testing external dockerfile features
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:07 -07:00
Akihiro Suda 048130d1d0 simplify rootless
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-16 14:05:58 +09:00
Tonis Tiigi 94a6c5c79d dockerfile: add test for empty copy directory
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 16:43:21 -07:00
Tonis Tiigi 1f51f5ea11 testutil: avoid excessive daemons in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-11 16:47:35 -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
Akihiro Suda ab6a2dc83e
Merge pull request #669 from tonistiigi/update-copy
dockerfile: update default copy image
2018-10-06 11:11:49 +09: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
Tonis Tiigi 079b429c12 dockerfile: fix ssh required option
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-05 14:10:09 -07:00
Tibor Vass ef99a677c5 dockerfile: change output when loading Dockerfile
Previously, the output said "load Dockerfile from " + filename when the
file is not named Dockerfile. With this patch, it is changed to always
show "load build definition from " + filename.

This is because `# syntax = ...` can be put in non-Dockerfiles.

Signed-off-by: Tibor Vass <tibor@docker.com>
2018-10-04 20:52:15 +00:00
Akihiro Suda fa92effc4b dockerfile: add support for RUN --mount=type=ssh
* Needs to be compiled with `dfrunmount dfssh`
* Implemented options:
 * `type`(required): needs to be `ssh`
 * `target`(optional): the socket path in the container
 * `id`(optional): id

Test script:

	#!/bin/bash
	set -exu -o pipefail
	REF=localhost:5000/dfssh:latest
	ssh-add -l
	sudo buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=frontend/dockerfile/cmd/dockerfile-frontend \
	  --frontend-opt "build-arg:BUILDTAGS=dfrunmount dfssh" \
	  --exporter=image --exporter-opt name=$REF --exporter-opt push=true
	mkdir -p /tmp/foo
	cd /tmp/foo
	cat << EOF > Dockerfile
	# syntax=$REF
	FROM alpine
	RUN apk add --no-cache openssh-client
	RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
	RUN --mount=type=ssh ssh git@gitlab.com
	# "Welcome to GitLab, @GITLAB_USERNAME_ASSOCIATED_WITH_SSHKEY" should be printed here
	EOF
	sudo buildctl build --ssh default=$SSH_AUTH_SOCK --progress=plain --frontend=dockerfile.v0 --local context=. --local dockerfile=.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 14:53:43 +09: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
Tonis Tiigi d40d557692 dockerfile: fix building dfextall
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-02 10:33:18 -07: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
Tõnis Tiigi e04e16c836
Merge pull request #641 from tonistiigi/llb-caps-check
gateway: allow access to apicaps
2018-09-25 09:02:40 -07:00
Tonis Tiigi 895950cecf executor: fix submount symlink resolution
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-24 17:42:38 -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 f6352a305f dockerfile: add symlink copy tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-21 13:16:57 -07:00
Tõnis Tiigi 39404586a5
Merge pull request #622 from tonistiigi/df-modes-switch
dockerfile: enable frontend selection in integration tests
2018-09-20 14:44:11 -07:00
Tibor Vass 9890dda814
Merge pull request #634 from tonistiigi/schema1-config-fix
imageutil: fix getting schema1 configs
2018-09-19 15:50:52 -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 2ab0922500 dockerfile: enable frontend selection in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:07:38 -07:00
Tonis Tiigi a75983ddb9 integration: pass mirrored images from test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:07:38 -07:00
Tonis Tiigi 0940cdc6fe update golint comments
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-18 22:06:47 -07:00
Tibor Vass 0cd2b56a52
Merge pull request #629 from tonistiigi/df-output-fix
dockerfile: improve output
2018-09-17 15:39:14 -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 b103d7fdd6 dockerfile: allow relative paths in mount targets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-09-17 11:15:22 -07:00
Akihiro Suda bf571a519e update Go to 1.11
For consistency with Moby (moby/moby#37358)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-09-15 14:25:11 +09: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
Tibor Vass 6812dac65e
Merge pull request #596 from tonistiigi/required-secret
dockerfile: add required option for secrets
2018-09-04 08:05:41 -07: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
Tibor Vass 94b009b27e
Merge pull request #594 from tonistiigi/override-copy
dockerfile: allow overriding copy image
2018-08-31 14:35:06 -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
Tibor Vass 17e6416706
Merge pull request #504 from kunalkushwaha/no-console
--no-progress replaced with --progress
2018-08-29 13:44:51 -07:00
Tonis Tiigi 6daf696f04 dockerfile: add required option for secrets
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-28 16:18:08 -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
Kunal Kushwaha 49c9f75275 --no-progress replaced with --progress
this make buildctl build output options same as moby.

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-08-27 11:23:15 +09:00
Akihiro Suda decb27618b containerd: set timeout explicitly (60s)
The contained default value was shortened from 60s to 10s in containerd/containerd#2554

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-08-23 18:14:57 +09:00
Akihiro Suda af46188e9b
Merge pull request #533 from ijc/client-gateway
access gateway API from client
2018-08-17 05:12:23 +09: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
Akihiro Suda 809b9a4602
Merge pull request #568 from tonistiigi/multi-platform
dockerfile: allow multi-target external builds
2018-08-10 00:09:35 +09:00
Tonis Tiigi fa83e55b21 dockerfile: allow multi-target external builds
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-08 18:42:43 -07:00
Tonis Tiigi 5e6729e56f dockerfile: implement secret type mounts
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-08-08 18:12:16 -07:00
Ian Campbell 682dce615a gateway: support direct creation/running of a client.
Provide a `New` method and a new `Run` method on the `grpcClient` to allow
manual creation of a client in addition to the current ability to initialise
from the environment. Accordingly the existing `Run` method becomes
`RunFromEnvironment`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-08-08 10:17:32 +01: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 97fa2b527a cache: add all option to prune
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-26 22:55:05 -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 f719aadcba dockerfile: add tests for multi-platform exports
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 16:01:12 -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
Tonis Tiigi 33f4382b69 dockerfile: support exporting multiple platforms
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-25 14:37:01 -07:00
Tonis Tiigi 0d6b052c97 dockerfile: add test for incremental copy regression
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-24 23:28:55 -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 5b70c51b7d Add test cases for `toEnvList`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:31:43 +09:00
Yuichiro Kaneko 75118c8a82 Add Map version `ProcessWords`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-20 19:01:31 +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
Tõnis Tiigi db8b382274
Merge pull request #518 from yui-knk/add_test_for_addEnv
Add test cases for `addEnv` which is a bit complicated function
2018-07-18 22:41:39 -07:00
Akihiro Suda 1be4a5891d
Merge pull request #516 from yui-knk/update_comment_Parse
Add a description about metaArgs return value
2018-07-19 12:16:37 +09:00
Yuichiro Kaneko f79f28cf83 Add test cases for `addEnv` which is a bit complicated function
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 09:39:22 +09:00
Yuichiro Kaneko 93e3b15854 `s/docker file/Dockerfile/`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-19 07:38:58 +09:00
Yuichiro Kaneko ee15340993 Add a description about metaArgs return value
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-18 22:32:15 +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 8715fbf6bf Add string map version ProcessWord to Lex
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-16 17:49:28 +09:00
Yuichiro Kaneko 6583105db9 Use strings map instead of slice of string in `shellWord`
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-16 17:46:28 +09:00
Tonis Tiigi 01b7a29e86 gateway: return result from solve
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:51:44 -07:00
Tonis Tiigi 9684362cb0 frontend: move forwarder under gateway
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:50:19 -07:00
Tonis Tiigi d9f1a1d99f gateway: expose buildopts and result
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-12 17:50:19 -07:00
Tonis Tiigi bdf391a67d dockerfile: test for snapshot leak
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-11 16:21:32 -07:00
Tonis Tiigi ddf3f3e59c frontend: fix two data races
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-10 19:31:33 -07:00
Tõnis Tiigi f4694ee01b
Merge pull request #488 from yui-knk/stop_create_ArgCommand
Use simple `keyValuePair` to `dispatchOpt.metaArgs` and `dispatchState.buildArgs`
2018-07-10 08:02:21 -07: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
Tonis Tiigi c8fa75ffc1 dockerfile: read default build platform from workers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-07-09 16:32:39 -07:00
Tõnis Tiigi cda0a64eca
Merge pull request #486 from AkihiroSuda/update-rootless
rootless: refactor libcontainer_specconv & add integration tests
2018-07-05 11:26:26 -07:00
Yuichiro Kaneko b5c66082a1 Fix orders of `require.Equal` argument to "expected, actual"
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-04 21:59:37 +09:00
Akihiro Suda 580dbe08b9 rootless: add integration tests
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-07-04 19:27:54 +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 ec798d6b09 Update documents of `AddCommand`
`ADD` does not support git.

Ref: https://github.com/moby/moby/issues/14704#issuecomment-298134333

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-03 09:25:30 +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
Yuichiro Kaneko fdfa7b8431 Add description about Unix
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-07-01 00:08:35 +09:00
Yuichiro Kaneko a448c8f3fb Fix a typo
Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
2018-06-30 11:20:33 +09:00
Anda Xu 7f64188f17 add missing supplementary group IDs
Signed-off-by: Anda Xu <anda.xu@docker.com>
2018-06-29 18:50:03 -07: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