Skip to content
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

Please consider adding a buildpack-deps flavor with both opm and luarocks #267

Open
jgonggrijp opened this issue Jan 24, 2025 · 1 comment

Comments

@jgonggrijp
Copy link

I'm just starting out writing my first serious OpenResty application. Since I'm very much in a development stage and not at all in a deployment stage, I was looking for a batteries-included container image that would let me easily install dependencies.

Development-oriented images are usually based on buildpack-deps, because this comes with a lot of tools preinstalled (such as gcc and git) and because the shared foundation reduces the total combined size of all images on the developer's machine (despite the fact that buildpack-deps itself is obviously quite large). Hence, this is also what I started looking for when I opened the documentation for the OpenResty images on Docker Hub.

Since there was no such image, I initially figured I would probably just settle on the Bookworm flavor, since that is also what buildpack-deps is based on by default. However, then I read the sections about OPM and LuaRocks. I don't know exactly yet what packages I'll be needing, so I like to keep my options open and select an image that comes with both package managers preinstalled. Unfortunately, most flavors offer one or the other but not both.

After reading the Dockerfile of the alpine-fat flavor to establish that it doesn't come with OPM (which is a bit ambiguous from the documentation), I realized my only options were centos or bionic, both of which are quite outdated.

I tried running /usr/local/openresty/luajit/bin/luarocks install lpeg inside a container based on openresty:1.27.1.1-1-centos, but this failed because gcc was not installed. Which is, of course, because the image is deployment-oriented.

I hope that this story makes clear why it would add value for developers to provide a batteries-included image flavor. Something like the bionic flavor, but based on buildpack-deps:bookworm and without removing the build dependencies, would be ideal.

Please let me know if you don't plan to do it, but welcome pull requests.

In the meanwhile, I will probably try to make do with the centos or bionic flavor and install any missing tools myself. Suggestions welcome for other approaches to get an image that has all of OpenResty, OPM, LuaRocks and the usual development tools.

@jgonggrijp
Copy link
Author

Update: I just found out that the bionic flavor retains gcc and other build dependencies, so that saves me some hassle. Having something based on buildpack-deps:bookworm would still be better because of the combined size advantage and because it is more up to date, so keeping this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant