Skip to content

openssl3 header files not installed in bookworm-buildpack variant #283

@jgonggrijp

Description

@jgonggrijp

My Dockerfile (the rockspec lists busted, lua, lapis and moonscript as dependencies):

FROM openresty/openresty:1.27.1.2-5-bookworm-buildpack

WORKDIR /app/server

ENV RESTY_ROOT=/usr/local/openresty
ENV LUAJIT_ROOT=${RESTY_ROOT}/luajit
ENV opm=${RESTY_ROOT}/bin/opm
ENV luarocks=${LUAJIT_ROOT}/bin/luarocks

COPY server-dev-1.rockspec .
RUN $luarocks install --only-deps --lua-version=5.1 server-dev-1.rockspec \
    CRYPTO_DIR=${RESTY_ROOT}/openssl3 \
    OPENSSL_DIR=${RESTY_ROOT}/openssl3
COPY . .

CMD moonc . && moonc -w . & lapis server

Relevant part of the output of podman-compose up -d --build:

Error: Failed installing dependency: https://luarocks.org/lapis-1.16.0-1.src.rock - Failed installing dependency: https://luarocks.org/luaossl-20250929-0.src.rock - Could not find header file for CRYPTO
  No file openssl/crypto.h in /usr/local/openresty/openssl3/include
You may have to install CRYPTO in your system and/or pass CRYPTO_DIR or CRYPTO_INCDIR to the luarocks command.

Inspecting the image, /usr/local/openresty/openssl3 exists. It has bin and lib subdirectories (with contents) but no include.

I previously used the bionic image variant and didn't have this problem there.

I mentioned this problem before in #267 (comment).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions