copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

allow more/all Docker build options

Open huanjani opened this issue 3 years ago • 1 comments
trafficstars

Docker has many options to use with docker build: https://docs.docker.com/engine/reference/commandline/build/#options. Copilot currently supports only a handful of these flags under image.build:

image:
  build:
    dockerfile: path/to/dockerfile
    context: context/dir
    target: build-stage
    cache_from:
      - image:tag
    args:
      key: value

Copilot users are interested in leveraging other options, for instance, this user, who wants to use --no-cache. Users could have much more control over their builds if we just injected all key-value pairs as flag-value pairs when running the docker build command. We would have to figure out how to handle flags that don't require values, as well as whether to prohibit any incompatible flags/validate in some way.

Benefits are that users have more flexibility and that Copilot maintainers don't have to keep up with Docker's options. One drawback is an increased possibility of build failure.

huanjani avatar Apr 14 '22 18:04 huanjani

Related: #2090

huanjani avatar Jul 11 '22 23:07 huanjani

We'd love to use Depot for builds, and opening this up would make that easier.

wub avatar Nov 06 '23 08:11 wub