Commit Graph

211 Commits (master)

Author SHA1 Message Date
Erik Sipsma cc1499e6d9 Add support for weak ProgressGroup membership.
A ProgressGroup will now only be displayed if a vertex member marked as
non-weak has started.

Signed-off-by: Erik Sipsma <erik@sipsma.dev>
2022-02-25 10:24:15 -08:00
Tõnis Tiigi b0e56cd563
Merge pull request #2654 from crazy-max/buildinfo-contexts
buildinfo: named input contexts support
2022-02-23 12:13:14 -08:00
Tonis Tiigi c99126012c dockerfile: fix COPY —link to keep previous llb state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-23 10:52:23 -08:00
CrazyMax 2661917e8d
buildinfo: handle deps
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-23 10:40:33 +01:00
Tõnis Tiigi 61027554b7
Merge pull request #2596 from tonistiigi/copy-link
dockerfile: add COPY --link for copy via merging layers
2022-02-14 14:23:23 -08:00
CrazyMax cdaafb9303
buildinfo: use metadata to set frontend build sources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:20 +01:00
CrazyMax c29411b41a
buildinfo: add build attributes and frontend
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:19 +01:00
CrazyMax b4e37a867f
buildinfo: refactor
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-14 21:55:18 +01:00
Tonis Tiigi 8441d0a45d dockerfile: use progressgroup for copy link
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:44 -08:00
Tonis Tiigi 6f64543249 dockerfile: add support for COPY/ADD —link
Enables smarter file copy logic using the mergeop
implementation.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-02-10 22:09:37 -08:00
Justin Chadwell 90ddf87a22 Fix combinations of quotes and heredocs
This adds a couple more integration tests to more fully define the
behavior of these interactions. Additionally, through this, a minor
difference to POSIX was discovered where quotes are supposed to be
properly preserved in a heredoc (since a heredoc is treated as a
double-quoted word).

To handle this, a new property, SkipProcessQuotes is added to the shell
lexer which simply treats quotes as ordinary characters. This is the
only behavioral change needed to actually get the new tests working.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Justin Chadwell 8005660443 Fix heredoc COPY/ADD expansion to preserve quotes
In the contents of COPY/ADD, we perform expansion on variables using a
lexer. However, this lexer, by default, removes quotes as well as
expanding variables - this isn't really the kind of behavior we're
after, as it feels quite unintuitive.

To fix this, we introduce a new ExpandRaw function, which commands can
implement that implement an alternative expansion that preserves quotes
(and possibly other characters/features in the future).

Additionally, we introduce new tests to more clearly define the desired
behavior. One major note is that backslashes are not passed directly,
and are processed, following normal escape rules (so that we can use `$`
symbols directly).

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-01-31 10:53:58 +00:00
Tonis Tiigi 45d02301c2 dockerfile: show target platform on cross compiling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-23 21:55:19 -08:00
Tonis Tiigi dc21885891 hack: enable more linters
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-01-19 12:20:30 -08:00
Tonis Tiigi 4eadeaf0f2 dockerfile: add support for named contexts
Stages and implicit stages from image names can be
redefined with build options.

This enables using more that one source directory
and reusing results from other builds. This can also
be used to use a local image from other build without
including a registry.

Contexts need to be defined as `context:name=` frontend
options. The value can be image, git repository,
URL, local directory or a frontend input.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-15 20:51:01 -08:00
Tonis Tiigi 872518e334 update warning type definition
Detail is now an array and URL is a separate field.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-13 21:38:20 -08:00
Tonis Tiigi 71316c6f29 split warning message into short and detail
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-02 18:17:35 -08:00
Tonis Tiigi 50963e289e dockerfile: show redirect parser warnings
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-30 21:58:37 -08:00
Akihiro Suda d47b46cf2a
Merge pull request #2432 from crazy-max/gofmt
go fmt: add //go:build
2021-10-29 12:32:52 +09:00
CrazyMax 54b8ff2fc8
go fmt: add //go:build
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-28 13:26:43 +02:00
CrazyMax c82ef274bf
cgroup-parent support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-27 23:50:20 +02:00
CrazyMax 87e1fa7ecb
add size to tmpfs mounts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-18 10:54:52 +02:00
CrazyMax 4e32ae5630
Add support for ulimit
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-08 11:50:09 +02:00
CrazyMax 6094339341
Add support for shm size
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-01 16:07:29 +02:00
CrazyMax 5fcc94454f
Generate and embed build sources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-18 01:39:35 +02:00
Koichi Shiraishi 671ae38fb7
all: unify the specs-go package import alias to ocispecs
ocispecs means "O"pen "C"ontainer "I"nitiative image-spec/"specs"-go/v1
                      opencontainers          /image-spec/specs-go/v1

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
2021-08-11 08:29:09 +09:00
Sebastiaan van Stijn cea791d3fe
replace use of deprecated github.com/docker/docker/pkg/signal
This package was moved to a separate module in github.com/moby/sys/signal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-02 12:19:45 +02:00
Tõnis Tiigi 9df59934cd
Merge pull request #2218 from tonistiigi/error-suggest
dockerfile: add suggestions to how to fix certain errors
2021-07-07 10:52:07 -07:00
Tonis Tiigi 259fba7d43 dockerfile: move run network to stable channel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-06 15:25:29 -07:00
Tonis Tiigi 277517e2a3 add error suggest pkg
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-02 17:29:27 -07:00
Justin Chadwell c99b558ec3 Improve progress and history messages for heredoc-related commands
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-07-01 09:15:51 +01:00
Tonis Tiigi 111153eafb dockerfile: ensure config resolve errors keep source location
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-16 22:16:16 -07:00
Justin Chadwell e49dc642cf Fix file modes with remote ADD commands
Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-14 18:52:13 +01:00
Justin Chadwell de7fcce614 Integrate heredoc support into ADD/COPY and RUN
This modifies the command structures to support inline files, as well as
provides the logic to compile them down into appropriate LLB
definitions.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2021-06-09 10:53:25 +01:00
Tõnis Tiigi 1465ce570b
Merge pull request #2089 from omermizr/feature/run-mount-variables
feat(run-mount): add support for variable expansion
2021-05-06 00:20:01 -07:00
Omer Mizrahi aa467196bd feat(run-mount): add support for variable expansion
Signed-off-by: Omer Mizrahi <ommizrah@microsoft.com>
2021-05-05 02:56:39 +03:00
Sebastiaan van Stijn a743d4ba02
Add "ALL_PROXY" to list of default args / proxy env-vars
Relates to a82fff6377/docs/packages.md (proxies)

> (..) the first four of these are the standard built-in build-arg options
> available for `docker build`
> (..) The last, `all_proxy`, is a standard var used for socks proxying. Since
> it is not built into `docker build`, if you want to use it, you will need to
> add the following line to the dockerfile:
>
>     ARG all_proxy

Given the we support all other commonly known proxy env-vars by default, it makes
sense to add this one as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-24 18:19:02 +02:00
岁丰 adca74632e dockerfile build: return error when meet error in load config metadata
Signed-off-by: genglu <genglu.gl@antfin.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-11-16 17:16:02 -08:00
Tonis Tiigi 63856b6a36 dockerfile: set default shell based on OS
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Tonis Tiigi ecf070a027 exec: use platform specific default path
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-23 15:30:23 -07:00
Lu Jingxiao 5e7ae230b2 Add hostname specifying for building
Fix: #1301

Signed-off-by: Lu Jingxiao <lujingxiao@huawei.com>
2020-10-14 14:45:36 +08:00
Tonis Tiigi 906e34510d dockerfile: update run mounts to stable channel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-04 22:22:08 -07:00
Tonis Tiigi c810b8ed25 dockerfile: allow multiple values for ARG
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-22 11:56:51 -07:00
Tonis Tiigi c8190b1518 lint: enable golint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-07-19 09:28:24 -07:00
Chenbin b7fd382230 add chmod in COPY and ADD command
Signed-off-by: Chenbin <chen.bin11@zte.com.cn>
2020-06-10 21:37:46 +08:00
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