docusealco / docuseal

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️
https://www.docuseal.co
GNU Affero General Public License v3.0
5.97k stars 410 forks source link

Support old kernel (or how about using ruby 3.0.*) #90

Closed webysther closed 1 year ago

webysther commented 1 year ago

This error only happens on synology DS716 and for the same OS version on DS918 works the image, for me is something related to limitations of hardware and incompat with muslc but I can't confirm because only alpine image is provided.

/usr/local/lib/ruby/3.2.0/securerandom.rb:55:in `urandom': failed to get urandom (RuntimeError)
    from /usr/local/lib/ruby/3.2.0/securerandom.rb:55:in `gen_random_openssl'
    from /usr/local/lib/ruby/3.2.0/random/formatter.rb:74:in `random_bytes'
    from /usr/local/lib/ruby/3.2.0/random/formatter.rb:94:in `hex'
    from /app/config/boot.rb:14:in `<top (required)>'
    from /app/bin/rails:3:in `require_relative'
    from /app/bin/rails:3:in `<main>'
version: "3.9"

services:
  docuseal:
    image: docuseal/docuseal
    container_name: app-sign
    expose:
      - 3000
    networks:
      docuseal:

networks:
  docuseal:
    name: docuseal
webysther commented 1 year ago

Kernel version, 3.10 not working, 4.4 working:

ash-4.4# docker run -it --rm ruby:3.1-bullseye bash
Unable to find image 'ruby:3.1-bullseye' locally
3.1-bullseye: Pulling from library/ruby
6a70103cc499: Pull complete 
ccb4221e2c63: Pull complete 
9fe6e67e69c8: Pull complete 
ea30286b46fb: Pull complete 
4d7fb051a096: Pull complete 
eafc8e592247: Pull complete 
d4dab214998f: Pull complete 
Digest: sha256:44dd37c93f67c6162dd08aea7ce60a0bc9a5cdc81f6119fc1f5dd412c7ccf95c
Status: Downloaded newer image for ruby:3.1-bullseye
root@8019fa38d473:/# irb
irb(main):001:0> require 'securerandom'
/usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `urandom': failed to get urandom (RuntimeError)
from /usr/local/lib/ruby/3.1.0/securerandom.rb:75:in `singleton class'
from /usr/local/lib/ruby/3.1.0/securerandom.rb:42:in `<module:SecureRandom>'
from /usr/local/lib/ruby/3.1.0/securerandom.rb:41:in `<top (required)>'
from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/usr/local/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from (irb):1:in `<main>'
from /usr/local/lib/ruby/gems/3.1.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>'
from /usr/local/bin/irb:25:in `load'
from /usr/local/bin/irb:25:in `<main>'
irb(main):002:0> exit
root@8019fa38d473:/# uname -a
Linux 8019fa38d473 3.10.108 #64561 SMP Fri May 19 01:32:53 CST 2023 x86_64 GNU/Linux
webysther commented 1 year ago

Related to https://github.com/docker-library/ruby/issues/383

webysther commented 1 year ago

With docker run -it --rm ruby:3.0-alpine works, seems broken from ruby:3.1-alpine, any change to downgrade to Ruby 3.1 to support old kernel? Looks like Alpine 3.16 is the last version that support kernel 3.10.

ash-4.4# docker run -it --rm ruby:3.0-alpine sh
/ # irb
=> true
AlexandrToorchyn commented 1 year ago

@webysther Unfortunately we're not planning to downgrade the Ruby version to support older linux kernels. But you can modify the Dockerfile to build DocuSeal docker image that works on your server. In order to do that you just need to change the base docker image as well as the ruby version specified in the Gemfile. Hope that solution will work for you 👍

webysther commented 1 year ago

Yes, 'course, I just wonder if have this on your docker hub without the need to build by my self, because the reqs are not MAJOR and considered MINOR, but I saw the gemfile and looks like the version is locked in 3.2.2

webysther commented 1 year ago

There's any chance to provide a tag for this like the rube hub version with tag? I will start a PR to demonstrate what I said, because make more sense just put this step to the current project, I think this is interesting to have a more wide public.

AlexandrToorchyn commented 1 year ago

@webysther Unfortunately, supporting older systems is quite time-consuming. I believe the official repository should prioritize the latest versions of Ruby and Alpine. This will help ensure that the application remains secure and is not exposed to vulnerabilities.