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
Akihiro Suda
98e26e9685
Merge pull request #668 from tonistiigi/ssh-required-opt
...
dockerfile: fix ssh required option
2018-10-06 06:50:27 +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
Ian Campbell
2ea0269ec4
gateway: check for `ReadDir` and `StatFile` caps on client side
...
This will produce a "requested feature is not supported" style error message
with some more specific details about the build server configuration rather
than a more generic gRPC "unsupported" error message.
Ensure that the tests pass the caps to `Marshal` so they see the new
functionality.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-05 15:20:50 +01:00
Tõnis Tiigi
520201006c
Merge pull request #665 from tiborvass/fix-dockerfile-load-output
...
dockerfile: change output when loading Dockerfile
2018-10-04 19:22:00 -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
Ian Campbell
b4454a169f
implement `gateway.Reference.StatFile` method
...
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:45 +01:00
Ian Campbell
df76f6d380
Move cache/fsutil into a separate cache/util subpackage
...
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Ian Campbell
b30ee91a53
implement `gateway.Reference.ReadDir` method
...
The alternative is a helper container running e.g. find, capturing the output
to a scratch to be read back (with ref.ReadFile) and parsed.
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-10-03 12:16:44 +01:00
Tõnis Tiigi
c9dc8352a4
Merge pull request #656 from AkihiroSuda/cap-ssh
...
define CapMountSSH
2018-10-02 23:21:17 -07:00
Akihiro Suda
758a267235
s/CapMount/CapExecMount/g
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-03 15:03:36 +09: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