omkar619-dev opened a new pull request, #14219: URL: https://github.com/apache/apisix/pull/14219
### Description `make deps` fails in the development image built from `example/build-dev-image.dockerfile`, which the [macOS development environment guide](https://github.com/apache/apisix/blob/64d831f4f389ad652eb9b180fd4fd5f9c794b5b0/docs/en/latest/build-apisix-dev-environment-on-mac.md) uses. The `api7-lua-rapidjson` rock ([apisix-master-0.rockspec L91](https://github.com/apache/apisix/blob/64d831f4f389ad652eb9b180fd4fd5f9c794b5b0/apisix-master-0.rockspec#L91)) is built with CMake, and the image does not install it: ```txt Error: Failed installing dependency: https://luarocks.org/api7-lua-rapidjson-0.7.2-0.src.rock - Build error: 'cmake' program not found. Make sure CMake is installed and is available in your PATH (or you may want to edit the 'variables.CMAKE' value in file '/usr/local/etc/luarocks/config-5.1.lua') make: *** [Makefile:134: deps] Error 1 ``` This PR adds `cmake` to the development utils that the image installs. Ubuntu 20.04 provides CMake 3.16.3, and the rock's `CMakeLists.txt` asks for 3.5.0 or newer. On Ubuntu 20.04, installing `cmake` also installs `tzdata`, and `tzdata` asks for a time zone. Nothing can answer that during `docker build`, so the build stops there. This PR runs that `apt install` with `DEBIAN_FRONTEND=noninteractive`, so `tzdata` takes its default (UTC). Because `tzdata` is then already set up in the image, `make deps` no longer stops to ask for a time zone either, which it did before when it installed `tzdata` itself. CI does not run into this because the source install workflow installs `cmake` itself before `make deps` ([source-install.yml L73](https://github.com/apache/apisix/blob/64d831f4f389ad652eb9b180fd4fd5f9c794b5b0/.github/workflows/source-install.yml#L73)). Testing, with Docker Desktop on an Apple silicon Mac (linux/arm64): - Without the change, `make deps` in the dev container stops with the error above. - With only `cmake` added to the `apt install` line, `docker build` stops at the `tzdata` time zone question. - With this change, the image builds and has CMake 3.16.3, and `docker exec -it <container> make deps` (the command from the guide) completes in a fresh container without asking anything. #### Which issue(s) this PR fixes: There is no issue for this. I ran into it while following the macOS development environment guide. ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [ ] I have added tests corresponding to this change - [ ] I have updated the documentation to reflect this change - [x] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
