11c84973ef
buildflags: fix ref only format for command line and bake
...
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com >
2025-01-22 13:18:38 -06:00
5dd4ae0335
bake: various fixes for composable attributes
...
This changes how the composable attributes are implemented and provides
various fixes to the first iteration.
Cache-from and cache-to now no longer print sensitive values that are
automatically added. These automatically added attributes are added when
the protobuf is created rather than at the time of parsing so they will
no longer be printed. If they are part of the original configuration
file, they will still be printed.
Empty strings will now be skipped. This was the original behavior and
composable attributes removed this functionality accidentally. This
functionality is now restored.
This also expands the available syntax that works with each of the
composable attributes. It is now possible to interleave the csv syntax
with the object syntax without any problems. The canonical form is still
the object syntax and variables are resolved according to that syntax.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com >
2024-12-18 10:26:15 -06:00
3ccbb88e6a
bake: initial set of composable bake attributes
...
This allows using either the csv syntax or object syntax to specify
certain attributes.
This applies to the following fields:
- output
- cache-from
- cache-to
- secret
- ssh
There are still some remaining fields to translate. Specifically
ulimits, annotations, and attest.
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com >
2024-11-21 12:31:11 -06:00
c0fd64f4f8
lint: enable linters from buildkit
...
Skipping errname and testifylint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2024-11-19 17:51:24 -08:00
48977780ad
bake: check for empty build network with compose
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com >
2024-11-14 19:27:54 +01:00
7957b73a30
bake: use compose project name from env if set
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com >
2024-07-04 16:37:07 +02:00
224c6a59bf
Bake: support compose ssh config
...
Signed-off-by: Sumner Warren <sumner.warren@gmail.com >
2024-05-13 08:46:17 -04:00
7e0ab1a003
docs: remove stub files and update links
...
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com >
2024-04-23 13:39:56 +02:00
64e2b2532a
bake: ulimits support
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com >
2024-02-20 11:23:42 +01:00
c2befc0c12
bake: shm-size support
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com >
2024-02-20 11:23:42 +01:00
13beda8b11
vendor: update compose-go to v2.0.0-rc.3
...
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com >
2024-01-31 14:15:57 +01:00
c043c9229e
compose: fix deprecated Load func
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2023-10-21 08:30:51 +02:00
503d483731
fix lint issues after update
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2023-10-19 12:31:24 +02:00
120f3a8918
bake: ignore profiles in compose definitions
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2023-06-22 17:44:35 +02:00
e228c398f4
bake: support compose additional contexts
...
compose-go v1.13.0 supports the new additional_contexts to allow passing
additional build context during build, so we should map this to bake's
contexts property.
Signed-off-by: Justin Chadwell <me@jedevc.com >
2023-05-10 09:41:37 +01:00
5d06406f26
bake: support compose inline dockerfile
...
compose-go v1.13.0 supports the new dockerfile_inline to allow including
a dockerfile inline in the compose definition, so we should map this to
bake's dockerfile-inline property.
Signed-off-by: Justin Chadwell <me@jedevc.com >
2023-05-10 09:39:00 +01:00
956a1be656
vendor: update to compose-go 1.13.4
...
Signed-off-by: Nick Sieger <nick@nicksieger.com >
2023-04-21 11:29:20 -05:00
21ac4c34fb
update github.com/compose-spec/compose-go to v1.9.0
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2023-02-03 03:19:59 +01:00
48357ee0c6
bake: fix loop references
...
Signed-off-by: Justin Chadwell <me@jedevc.com >
2023-02-01 10:13:43 +00:00
fe76a1b179
bake: support null label value
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-12-14 08:30:58 +01:00
df4957307f
bake: support null arg value
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-12-14 08:29:27 +01:00
be3b41acc6
docs: refactored file and directory structure
...
Signed-off-by: David Karlsson <david.karlsson@docker.com >
2022-11-04 19:57:50 +01:00
982a332679
bake(compose): fix unskipped services without build context
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-08-18 11:34:40 +02:00
7d8a6bc1d7
bake: load .env file from working dir for compose files
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-08-10 03:24:38 +02:00
7f572eb044
bake: contexts support with x-bake
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-08-05 15:21:26 +02:00
7ef679d945
bake(compose): allow dot in target name
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-07-31 16:53:44 +02:00
12fde33d9b
bake: dedup compose main and extension fields values
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-23 21:58:05 +02:00
a0f92829a7
bake: merge cache-from field from compose and x-bake
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-23 21:58:05 +02:00
b438032a60
bake: support compose build cache_to
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-23 21:58:04 +02:00
5ce3909c48
bake: fix compose consistency check
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-23 13:09:17 +02:00
432c2b2650
bake: better handling of compose extension interface
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-14 23:23:43 +02:00
6cb1b85d7b
bake: support compose build tags
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-14 18:45:57 +02:00
e0350f671a
bake: support compose secrets env
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-06-14 18:45:23 +02:00
c0f8a8314b
bake: support compose build secrets
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-04-14 01:28:00 +02:00
32f6358d78
bake: add no-cache-filter
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2022-02-10 22:01:48 -08:00
c74b2fe7a4
bake: restrict target name
...
This fix adds a restriction `[a-zA-Z0-9_-]+`
for target name. This is pretty much the same as the
container name restriction in moby.
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-01-26 10:29:21 +01:00
5d715ada96
compose: resolve build args from service environment
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2022-01-06 11:59:49 +01:00
ae53101e89
Add NetworkMode to bake target
...
Allows specification of network mode in a bake target.
Fixes #848
Signed-off-by: Zachary Povey <zachary.povey@autotrader.co.uk >
2021-11-25 16:00:42 +00:00
89e126fa60
bake: x-bake
extension field with compose
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2021-08-13 09:15:15 +02:00
9aa8f09f14
Set ConfigFile
to parse compose files with bake
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2021-07-30 17:56:40 +02:00
ba443811e4
Use compose-spec parser
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com >
2021-07-12 11:21:04 +02:00
dba79ba223
update lint to go1.16/golangci
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2021-02-16 23:43:06 -08:00
4121ae50b5
Modify parsing functions and config structs to accept hcl changes
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me >
2020-04-29 08:51:26 -04:00
92f1234aaa
Merge pull request #116 from tonistiigi/build-arg-default
...
build: load default build args from env
2019-07-30 19:20:09 -07:00
662c0768cb
bake: replace env in compose files
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2019-07-30 16:44:05 -07:00
43150ef849
build: load default build args from env
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2019-07-30 16:32:36 -07:00
b741350afd
bake: compose parser should only error if there are neither build nor image fields
...
Signed-off-by: Tibor Vass <tibor@docker.com >
2019-05-29 18:12:30 -07:00
4b2666b9d6
Change compose file handling to require valid service specifications
...
Added the checks and some tests
One of the tests wasn't valid docker-compose.yml, that's been changed.
Bad config throws an error and has a test
Signed-off-by: Jack Laxson <jackjrabbit@gmail.com >
2019-05-24 17:41:48 -07:00
43356bbbbe
bake: fix parsing target from compose files
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2019-04-25 21:36:28 -07:00
ef4afac948
bake: fix dockerfile and context defaults
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com >
2019-04-19 22:54:34 -07:00