Repository navigation
fix: Fix building the STK docker images with latest docker which uses Bake - #821
Conversation
Fixes docker warning below in the various dockerfiles. #2 WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)
This allows to run the doc_snippets_tests as they require grpc.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
==========================================
- Coverage 89.70% 89.70% -0.01%
==========================================
Files 67 67
Lines 188022 188022
Branches 1339 1339
==========================================
- Hits 168664 168662 -2
- Misses 18965 18967 +2
Partials 393 393 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jorgepiloto
left a comment
There was a problem hiding this comment.
Thanks for adding this, @duposyl. If we are moving to bake, should we also update the commands in tox.ini to use docker buildx bake rather than docker compose?
The arguments and options should remain the same, only thing changing is the command.
|
It looks like as long as we set: DOCKER_BUILDKIT=1we can keep using |
|
@jorgepiloto, is your concern that after this change docker compose with version prior to 2.36.2 would no longer work? Is that something that you are able to test on your side (mine is now |
|
@jwinkle8 tried this change with Docker Compose version v2.29.7-desktop.1, which is still using the old docker compose builder (as the switch to Bake was in 2.36.2). That failed because of the new Therefore, it looks like we have the following options:
@jorgepiloto, can you think of any other option? Should we go with option 3 for now? |
|
Thanks for listing these, @duposyl. If it works for you, let's go with the first option and be up to date as soon as possible. |
@jorgepiloto: Sounds good. I have added a note to the documentation in 9fdc166. It looks like this:
Only question left on my side is regarding the GitHub runner. There is no concern with getting the latest Docker Compose on it, right? If that's not a concern, then this PR is good to go as far as I am concerned. Thanks! |
|
Perfect, thanks @duposyl. I will update the self-hosted runner to use the latest stable version of Docker and Docker Compose. |

Latest versions of Docker promoted Bake as the default build tool for Compose (release notes). Bake tries to build the images in parallel which fails with the error below. Added
additional_contextsdeclarations to the STK Ubuntu Docker compose file to declare the dependencies between the various images, hence defining the build order. See the Use another service's image as the base image section in the Docker Compose documentation.Also fixed a few minor FromAsCasing docker warnings, and installed more dependencies as part of building the STK container images with tox to allow to follow the steps in CONTRIBUTING.md to run the doc_snippets_tests initialisation tests which require grpc.