Building with Mruby does not work
libDarkstreet opened this issue · comments
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
@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.
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.