-
Notifications
You must be signed in to change notification settings - Fork 778
Closed
Labels
Description
What is the problem you're trying to solve
A lot of issues and pull requests have been opened and asking to improve the build capabilities of the default implementation (Docker Compose).
We already have a bunch of proposals opened and pending in this specification to address some of those requests.
The objective of this issue is to aggregate the existing proposals in one place to facilitate tracking of the implementation progression.
Describe the solution you'd like
In the following section we'll define all the fields we want to add to the specification with links to
- description of the property or link to the existing proposal (if exists)
- Proposal Pull Request link
- Compose-Go PR link
- Compose PR link (optional)
When working on a PR (proposal, compose-go or compose) don't forget to reference this issue
List of the property to add
- cache-to see proposal Add platform and other properties to service.build #120
- proposal PR introduce cache-to #211
- Compose-Go PR add support for cache-to compose-go#232
- no-cache see proposal Add platform and other properties to service.build #120
- proposal PR introduce
no_cacheandpullto force a full rebuild #232 - Compose-Go PR implement no_cache and pull compose-go#233
- proposal PR introduce
- platforms see proposal Add platform and other properties to service.build #120 and And/or in
platformfield definition #197- proposal PR build: add platforms #267
- Compose-Go PR Add support of platforms in the build section compose-go#282
- pull:
always attempt to pull a newer version of the images used during the buildboolean- proposal PR introduce
no_cacheandpullto force a full rebuild #232 - Compose-Go PR implement no_cache and pull compose-go#233
- proposal PR introduce
- secrets see proposal Support for BuildKit extensions (secrets) #81
- proposal PR add secrets property to build section #238
- Compose-Go PR add secrets property to build section compose-go#236
- ssh:
SSH agent socket or keys to expose to the build, if no value provided should use the SSH_AUTH_SOCK env variablestring , see also Add platform and other properties to service.build #120- proposal PR Add ssh to build #234
- Compose-Go PR add mapping for ssh property in build section compose-go#234
- tags:
list of the tags associated to the final build imagearray, see also- proposal PR Add support of tags in the build section #255
- Compose-Go PR Add support of tags in the build section compose-go#256
- builder-options:
property to allow usage of builder specific build options, for example named context and output property of BuildXcontent unspecified by the Compose specification, can be used to enable custom builder features.- proposal PR
- Compose-Go PR
Additional context
Example using all this modifications
services:
frontend:
image: awesome/webapp:bar # image name to be build with a default tag name "bar"
build:
context: .
dockerfile: ./Dockerfile
args:
GITHUB_TOKEN: ${GITHUB_TOKEN}
tags: # define tags that should be associated to the image built
- ct-addon:foo
- ct-addon:alp
platforms: # define the platform targeted by the build
- linux/amd64
- linux/arm64
cache-from:
- user/app:cache
- type=local,src=path/to/cache
cache-to: type=local,dest=path/to/cache # define the cache export destination
pull: true # force pulling base and intermediate images use during the build
secrets: # runtime secrets section
- defaultsecret
aws:
image: ct-fake-aws:bar
build:
dockerfile: ./aws.Dockerfile
ssh: default # mount the default ssh agent
secrets: # build secrets section
- buildsecret
platforms: linux/arm64
no-cache: true # disabling caching for the buid process
builder-options: # property to pass custom options to the builder
- output: type=docker
- no-cache-filter:
secrets: # runtime secrets section
- defaultsecret
secrets:
defaultsecret:
file: ./defaultsecret
buildsecret:
file: ./secretReactions are currently unavailable