h2o / h2o

H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server

Home Page:https://h2o.examp1e.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building with Mruby does not work

libDarkstreet opened this issue · comments

commented

Hi, I've looked at the official docker images and I don't quite understand the many packages in them.

I recently made an Alpine based docker image which is 30mb. I probably missed something so I was wondering what else is needed to work properly?

It works very well for me so far, but I haven't tried things like mruby and I'm not sure if I need to install something to make it work or if it works by default.

My image: https://github.com/libDarkstreet/h2o-docker/blob/main/Dockerfile

commented

After reading through the documentation I tried to build it with mruby but unfortunately it always gets stuck at some point and I can't find the source of the problem.

Screenshot from 2023-02-22 12-34-51

@libDarkstreet
It seems to be fixed the same issue #2789
I can build your dockerfile patched below


diff --git a/Dockerfile b/Dockerfile
index 115afef..3f034b3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,15 +5,15 @@ ARG VER
 WORKDIR /h2o
 
 RUN apk update
-RUN apk add --no-cache git libstdc++ build-base ruby ruby-dev bison make cmake ca-certificates openssl-dev libc-dev linux-headers zlib-dev
+RUN apk add --no-cache git libstdc++ build-base ruby ruby-dev bison make cmake ca-certificates openssl-dev libc-dev linux-headers zlib-dev ruby-rake perl-dev
 RUN update-ca-certificates
 
 RUN git clone --depth 1 --branch $VER https://github.com/h2o/h2o.git .
 
-# RUN cmake -DWITH_MRUBY=on -DWITH_BUNDLED_SSL=on
+RUN cmake -DWITH_MRUBY=on -DWITH_BUNDLED_SSL=on
 # Mruby build currently broken.
 
-RUN cmake -DWITH_MRUBY=off .
+#RUN cmake -DWITH_MRUBY=off .
 RUN make -j 4 install
 
 FROM alpine:latest as prod

I consider that alpine:latest might have not include ruby3.1 at that time. And now the latest doesn’t include ruby-rake and perl-dev , I don’t see why it doesn’t but you should add with apk.

commented

Thanks! Here are the images: https://hub.docker.com/r/darkstreet00/h2o-docker

Later we will probably build all versions, for now we only have the latest ones.