Commit Graph

136 Commits (ea7a9146a294f210adba4156005ea6716c28ae24)

Author SHA1 Message Date
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
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
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
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 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
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