Tonis Tiigi
6dee7ee0fc
dockerfile: add source mapping tests
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-19 17:22:21 -07:00
Tonis Tiigi
e536302180
dockerfile: keep mapping on #syntax error
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:08 -07:00
Tonis Tiigi
6073e6cff3
llb: enable source tracking
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-05-18 15:50:03 -07:00
Tonis Tiigi
4b2636acca
dockerfile: add more source information to errors
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-21 23:46:17 -07:00
Tonis Tiigi
1a9d366b49
llb: asyncronous llb graph generation support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-03 14:55:10 -07:00
Edgar Lee
2edb431a0f
Allow previous solve results to be used in new solves
...
Signed-off-by: Edgar Lee <edgarl@netflix.com>
2020-01-23 11:02:40 -08:00
Tonis Tiigi
393f388ed3
dockerfile: clear onbuild rules after triggering
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-01-13 17:09:28 -08:00
Tonis Tiigi
9654e5eeda
dockerfile: fix copy symlinks on copied dir
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-28 22:10:05 -07:00
Sebastiaan van Stijn
59bf16c017
frontend: add padding to align steps in stage
...
This adds padding, so that the output of stages
that have 10 steps or more align better;
Before:
=> [dev 1/24] RUN groupadd -r docker 0.7s
=> [dev 2/24] RUN useradd --create-home --gid docker unprivilegeduser 1.0s
=> [dev 3/24] RUN ln -sfv /go/src/github.com/docker/docker/.bashrc ~/.bas 0.9s
=> [dev 4/24] RUN echo "source /usr/share/bash-completion/bash_completion" 1.0s
=> [dev 5/24] RUN ln -s /usr/local/completion/bash/docker /etc/bash_c 0.8s
=> [dev 6/24] RUN ldconfig 1.6s
=> [dev 7/24] RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib, 44.8s
=> [dev 8/24] RUN pip3 install yamllint==1.16.0 4.0s
=> [dev 9/24] COPY --from=swagger /build/swagger* /usr/local/bin/ 0.2s
=> [dev 10/24] COPY --from=frozen-images /build/ /docker-frozen-images 2.0s
=> [dev 11/24] COPY --from=golangci_lint /build/ /usr/local/bin/ 0.3s
=> [dev 12/24] COPY --from=gotestsum /build/ /usr/local/bin/ 0.3s
After:
=> [dev 1/24] RUN groupadd -r docker 0.7s
=> [dev 2/24] RUN useradd --create-home --gid docker unprivilegeduser 1.0s
=> [dev 3/24] RUN ln -sfv /go/src/github.com/docker/docker/.bashrc ~/.bas 0.9s
=> [dev 4/24] RUN echo "source /usr/share/bash-completion/bash_completion" 1.0s
=> [dev 5/24] RUN ln -s /usr/local/completion/bash/docker /etc/bash_c 0.8s
=> [dev 6/24] RUN ldconfig 1.6s
=> [dev 7/24] RUN --mount=type=cache,sharing=locked,id=moby-dev-aptlib, 44.8s
=> [dev 8/24] RUN pip3 install yamllint==1.16.0 4.0s
=> [dev 9/24] COPY --from=swagger /build/swagger* /usr/local/bin/ 0.2s
=> [dev 10/24] COPY --from=frozen-images /build/ /docker-frozen-images 2.0s
=> [dev 11/24] COPY --from=golangci_lint /build/ /usr/local/bin/ 0.3s
=> [dev 12/24] COPY --from=gotestsum /build/ /usr/local/bin/ 0.3s
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-21 22:29:26 +02:00
Andy Caldwell
113e3133cd
Don't set network/security mode on stable dockerfile
...
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2019-08-21 13:08:22 +01:00
Andy Caldwell
cc1b7b56c7
Add test that global network is applied if otherwise unspecified
...
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2019-08-20 14:57:31 +01:00
Andy Caldwell
588c07f9b4
Set RunOptions rather than modifying solve state
...
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2019-08-18 21:45:47 +01:00
Andy Caldwell
5ea3a003f7
Implement support for RUN --network=none|default|host
...
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2019-08-17 01:44:46 +01:00
Akihiro Suda
2b2bdac1b8
Merge pull request #1125 from tonistiigi/relative-ignore
...
dockerfile: ignore relative source paths for compatibility
2019-08-10 13:54:37 +09:00
Tonis Tiigi
f3960acce1
dockerfile: ignore relative source paths for compatibility
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-09 10:46:35 -07:00
Tonis Tiigi
872bf0b8c8
dockerfile: add cap for detecting correct nooutput support
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-08-08 22:07:34 -07:00
Tonis Tiigi
6371e4a31f
dockerfile: fix default cache IDs
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-26 14:27:06 -07:00
Tibor Vass
4bba1b1f3d
dockerfile: build args in history should honor env overrides
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-07-23 01:26:56 +00:00
Tibor Vass
f4702ad490
dockerfile: move toEnvMap function to tests
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-07-23 01:26:56 +00:00
Tibor Vass
a7e52bf76d
dockerfile: fix handling of empty build-arg also used as env
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-07-23 01:26:56 +00:00
Andrey Smirnov
86e19b621e
Implement frontend support for RUN --security=insecure
...
Example:
RUN --security=insecure cat /proc/self/status | grep CapEff
#84 0.093 CapEff: 0000003fffffffff
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
2019-07-19 01:01:42 +03:00
Tonis Tiigi
0cd68f6491
dockerfile: do not add linked and cache paths to context sources
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-11 17:11:59 -07:00
Tonis Tiigi
aed5e98d92
dockerfile: allow uid/gid in cache mounts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-22 11:20:15 -07:00
Stepan Blyshchak
ea4bb024df
[convert_test] add ut for circular dependency cases in dockerfile
...
Signed-off-by: Stepan Blyshchak <stepanblischak@gmail.com>
2019-05-11 19:48:18 +03:00
Stepan Blyshchak
981ee38406
[convert] move 'stageName = ""' in covert after checking for circular dependency
...
To have stageName in error output in case one stage depends on itself
Signed-off-by: Stepan Blyshchak <stepanblischak@gmail.com>
2019-05-11 18:25:22 +03:00
Stepan Blyshchak
98a6ff4fe2
apply gofmt
...
Signed-off-by: Stepan Blyshchak <stepanblischak@gmail.com>
2019-05-11 18:25:22 +03:00
Stepan Blyshchak
ad4ae59aa6
[dockerfile2llb] check for circular dependency in convert
...
Signed-off-by: Stepan Blyshchak <stepanblischak@gmail.com>
2019-05-11 18:25:22 +03:00
Tonis Tiigi
427e2f0a5f
exporter: put arm variant in the image config
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-22 18:01:30 -07:00
Tonis Tiigi
15ef4e2b8a
dockerfile: allow content cache for rw mounts
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 19:40:30 -07:00
Tonis Tiigi
a6e29dcdd4
dockerfile: handle args with unset values
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 14:40:53 -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
637bec7196
dockerfile: make fileop default
...
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
Tonis Tiigi
62697a93f7
dockerfile: allow custom context names
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-23 09:12:54 -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
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
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
12513ba394
dockerfile: remove dfextall build tag
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-10-15 22:27:13 -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
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