wahern / cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.
http://25thandclement.com/~william/projects/cqueues.html
MIT License
244 stars 37 forks source link

"This rockspec for cqueues does not support platforms." on openresty:alpine-fat. #218

Closed nakano-hiroaki closed 5 years ago

nakano-hiroaki commented 5 years ago

Hi, William

When I tryed to distribute docker image on alpine, cqueues was an error like title. Do you know something what happened?

Dockerfile:

FROM openresty/openresty:alpine-fat

ARG GATEWAY_BASE_URL
ENV GATEWAY_BASE_URL ${GATEWAY_BASE_URL:-https://"mysite.com" }

COPY ./nginx/lua/md5sum /usr/bin

RUN apk add --no-cache autoconf openssl-dev build-base bsd-compat-headers dnsmasq
RUN /usr/local/openresty/luajit/bin/luarocks --verbose install cqueues
RUN /usr/local/openresty/luajit/bin/luarocks install http \
  && /usr/local/openresty/luajit/bin/luarocks install lua-resty-template \
  && /usr/local/openresty/luajit/bin/luarocks install lua-resty-http \
  && echo 'nameserver 127.0.0.1' >> /etc/resolv.conf \
  && addgroup -g 1000 nginx \
  && adduser -u 1000 -H -D -G nginx nginx

COPY ./nginx/lua /usr/local/openresty/nginx/lua
COPY ./nginx/conf.d /etc/nginx/conf.d
COPY ./nginx/nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
COPY ./nginx/html/heartbeat/ /usr/local/openresty/nginx/html/heartbeat/
COPY ./nginx/html/health/ /usr/local/openresty/nginx/html/health/
COPY ./nginx/html/loader/ /usr/local/openresty/nginx/html/loader/

Errored:

> docker build -t proxy ./
Sending build context to Docker daemon  143.9kB
Step 1/13 : FROM openresty/openresty:alpine-fat
 ---> 741e0c64e7b5
Step 2/13 : ARG GATEWAY_BASE_URL
 ---> Using cache
 ---> 7c2da32b3d7a
Step 3/13 : ENV GATEWAY_BASE_URL ${GATEWAY_BASE_URL:-https://gateway.dmm.com}
 ---> Using cache
 ---> 9637666acb0b
Step 4/13 : COPY ./nginx/lua/md5sum /usr/bin
 ---> Using cache
 ---> 9a841512af85
Step 5/13 : RUN apk add --no-cache autoconf openssl-dev build-base bsd-compat-headers dnsmasq
 ---> Using cache
 ---> a4a31009a6bf
Step 6/13 : RUN /usr/local/openresty/luajit/bin/luarocks --verbose install cqueues
 ---> Running in c6c364697808

os.execute:     cd '/' && test '-d' '//./.luarocks'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 1

...(snip)

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/include/openssl/crypto.h'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/lib/libcrypto.a'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/local/include/openssl/ssl.h'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 1

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/local/include/openssl/ssl.h'
Results: 3
  1 (nil): nil
  2 (string): exit
  3 (number): 1

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/include/openssl/ssl.h'
Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

os.execute:     cd '/tmp/luarocks_cqueues-20171014.51-0-MeoDgj' && test '-f' '/usr/lib/libssl.a'
Error: This rockspec for cqueues does not support  platforms.

Results: 3
  1 (boolean): true
  2 (string): exit
  3 (number): 0

...(snip)

The command '/bin/sh -c /usr/local/openresty/luajit/bin/luarocks --verbose install cqueues' returned a non-zero code: 1
daurnimator commented 5 years ago

This looks like a luarocks issue. It seems not to be detecting your platform correctly. Could you file a bug with luarocks?

nakano-hiroaki commented 5 years ago

Thanks for suggestion.

I look forward to luarocks issues, I think the same case as this issue. I'll try openresty/alpine image of the other versions.

daurnimator commented 5 years ago

This should have been fixed with https://github.com/luarocks/luarocks/pull/994