New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add platform and other properties to service.build #120
Comments
Relevant issue from the community (talking about secrets): #81. The conversation about secrets is probably best had there. |
I am not convinced that there's a need for a dedicated
The only remaining use case (I can think of) is building multi-platform images via |
Yes, you're right about service.platform for the inner loop, not sure how I missed that. Give that the only other case is on push, maybe a |
|
Hi @jkeiser, thank you for chipping in 👍 I believe |
Somewhat related; I've been meaning to write up something on an idea I had; I had some notes on my computer, so decided to just post them "as-is" in #188 |
Build platforms
With the arrival of Arm on developer laptops and in data centers, developers are being pushed into a multi architecture world. Compose services have a platform property of type string which is used to determine what the pulled or built image's platform should be.
This works for local development or deployment as users only need a single architecture at a time. When publishing images to a container registry, users may want to build and push the images for multiple platforms.
Question:
Should the build section have a platform property of type list of strings? If so, how does this relate to the service platform?
Proposal:
Add a platform string list property to build that is respected only when pushing images, doing an implicit build if needed. This will allow developers to have a quick development cycle (only using one architecture) but allow them to publish their images with multi architecture support.
Other properties
Investigating further, there may be other build properties that we would like to add. The current set of build properties are:
Docker
buildx
includes the following interesting flags that are currently not exposed in the Compose format:Question:
Should we add any of these properties?
Proposal:
There are some options taht would make sense to add now. Specifically:
cache-to
: Logical given that we havecache-from
already.no-cache
: Logical given the ability to specify a cache.platform
: As described above.secret
: It's a common issue that people do not have an easy way to attach secrets in a way that they are not built into the image.Some require more consideration as they're either very Docker specific or might be too niche:
allow
builder
load
output
ssh
The text was updated successfully, but these errors were encountered: