Skip to content

Improve Service build section #233

@glours

Description

@glours

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

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: ./secret

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions