Code Monkey home page Code Monkey logo

fullstaq-ruby-docker's Introduction

Fullstaq Ruby Docker images

Fullstaq Ruby is a custom build of standard MRI Ruby interpreter with memory allocator replaced, security patches applied, and more goodies on the way.

These images are intended to be used while Fullstaq and Hongli Lai haven't build their own.

Sponsored by Evil Martians

Usage

Pull it directly from the quay.io registry:

docker pull quay.io/evl.ms/fullstaq-ruby:3.3-jemalloc-slim

Or use as base image in your Dockerfile:

ARG RUBY_VERSION=3.3.2-jemalloc

FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-slim

Flavors

Ruby 3.3.2, 3.2.4, 3.1.6, and 3.0.7 with jemalloc and malloctrim are available. Images are built on top of Debian 10 (buster), 11 (bullseye), also Ruby 3.2 and newer are build on top of Debian 12 (bookworm):

# 3.3:
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bookworm
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-buster
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bookworm
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-buster

# 3.2:
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-bookworm
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-jemalloc-buster
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-bookworm
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.2.4-malloctrim-buster

# 3.1:
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-jemalloc-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-jemalloc-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-jemalloc-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-jemalloc-buster
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-malloctrim-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-malloctrim-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-malloctrim-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.1.6-malloctrim-buster

# 3.0:
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-jemalloc-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-jemalloc-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-jemalloc-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-jemalloc-buster
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-malloctrim-bullseye-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-malloctrim-bullseye
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-malloctrim-buster-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.0.7-malloctrim-buster

Latest patch versions for Ruby 3.3 on Debian 12 (bookworm) are also aliased with shortened tags including major and minor versions only: 3.3.2-jemalloc-bookworm → 3.3-jemalloc

docker pull quay.io/evl.ms/fullstaq-ruby:3.3-jemalloc-slim   # Same as quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3-jemalloc        # Same as quay.io/evl.ms/fullstaq-ruby:3.3.2-jemalloc-bookworm
docker pull quay.io/evl.ms/fullstaq-ruby:3.3-malloctrim-slim # Same as quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bookworm-slim
docker pull quay.io/evl.ms/fullstaq-ruby:3.3-malloctrim      # Same as quay.io/evl.ms/fullstaq-ruby:3.3.2-malloctrim-bookworm

For Ruby 3.2 and 3.1, short aliases for latest patch versions are made against Debian 11 (bullseye): 3.2.4-jemalloc-bullseye → 3.2-jemalloc

For Ruby 3.0, short aliases for latest patch versions are made against Debian 10 (buster): 3.0.7-jemalloc-buster → 3.0-jemalloc

Details

Ruby is installed from official APT package repository. Rbenv isn't used.

fullstaq-ruby-docker's People

Contributors

datachomp avatar envek avatar jmonteiro avatar keymastervn avatar manuelvanrijn avatar mrexox avatar ollym avatar ouyangjinting avatar skryukov avatar sponomarev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullstaq-ruby-docker's Issues

qemu: uncaught target signal 6 (Aborted) - core dumped

Try to use 3.1.2-jemalloc as docker base, but it seems been hanged on the bundle install with message qemu: uncaught target signal 6 (Aborted) - core dumped I'm not sure if I miss anything to build the image since I can build the image properly with ruby:3.1.2 base.

MacBook Pro (13-inch, M1, 2020)
Chip: Apple M1
Latest Version of Docker Desktop for Mac

ARG RUBY_VERSION=3.1.2-jemalloc
FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-slim
 => CACHED [4/7] COPY Gemfile /backend/Gemfile                                                                          0.0s
 => CACHED [5/7] COPY Gemfile.lock /backend/Gemfile.lock                                                                0.0s
 => [6/7] RUN bundle install                                                                                          360.0s
 => => # Fetching gem metadata from https://rubygems.org/.SEGV received in SEGV handler
 => => # SEGV received in SEGV handler
 => => # SEGV received in SEGV handler
 => => # qemu: uncaught target signal 6 (Aborted) - core dumped

Build for ARM64

Hello and thank you for your work.

We are using your docker image, but it looks like it is missing the ARM64 and ARM64/v8 build.
Is is possible for you to handle these platforms, as it is required to be ran with last apple M1.

We should have something like ruby official image

Screenshot
Maybe this can help medium post

build ruby 3.0.3

ruby has a new security release and it would be great to have a image with it..

It doesn't seem that 3.1.3 is available?

I tried using docker pull quay.io/evl.ms/fullstaq-ruby:3.1.3-jemalloc-bullseye image.

Dockerfile

#syntax=docker/dockerfile:1.2
FROM quay.io/evl.ms/fullstaq-ruby:3.1.3-jemalloc-bullseye

But once I run docker buildx build . I get an error:

[+] Building 2.1s (5/5) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                  0.0s
 => => transferring dockerfile: 729B                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                     0.0s
 => => transferring context: 34B                                                                                                                                                      0.0s
 => resolve image config for docker.io/docker/dockerfile:1.2                                                                                                                          1.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc                                                     0.0s
 => ERROR [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:3.1.3-jemalloc-bullseye                                                                                           0.6s
------
 > [internal] load metadata for quay.io/evl.ms/fullstaq-ruby:3.1.3-jemalloc-bullseye:
------
ERROR: failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = no match for platform in manifest sha256:989da0f4c3d97f5ecea166c378218f27af24ee563aff328841ad7adfb75c5cfa: not found

I checked hub and noticed that sizes for those images are missing. That probably means, that image was never created, while tags are there?

Screenshot 2023-02-20 at 14 51 49

Workaround

If I downgrade ruby version to ruby 3.1.2 then everything works as expected.

ruby 3.3.0

Doesn't seem to support ruby 3.3.0 yet

failed to install nokogiri

This project looks great!

I am trying to use the dockerfile... but currently failing in bundle install when it gets to nokogiri

Installing nokogiri 1.10.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/bundle/ruby/2.7.0/gems/nokogiri-1.10.10/ext/nokogiri
/usr/lib/fullstaq-ruby/versions/2.7.1-jemalloc/bin/ruby -I
/usr/lib/fullstaq-ruby/versions/2.7.1-jemalloc/lib/ruby/2.7.0 -r
./siteconf20200812-1-1kfq7iw.rb extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
Using mini_portile version 2.4.0
checking for gzdopen() in -lz... yes
checking for iconv... yes
************************************************************************
IMPORTANT NOTICE:

Building Nokogiri with a packaged version of libxml2-2.9.10
with the following patches applied:
        - 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
        - 0002-Remove-script-macro-support.patch
        - 0003-Update-entities-to-remove-handling-of-ssi.patch
        - 0004-libxml2.la-is-in-top_builddir.patch
        - 0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch

Team Nokogiri will keep on doing their best to provide security
updates in a timely manner, but if this is a concern for you and want
to use the system library instead; abort this installation process and
reinstall nokogiri as follows:

    gem install nokogiri -- --use-system-libraries
        [--with-xml2-config=/path/to/xml2-config]
        [--with-xslt-config=/path/to/xslt-config]

If you are using Bundler, tell it to use the option:

    bundle config build.nokogiri --use-system-libraries
    bundle install

Note, however, that nokogiri is not fully compatible with arbitrary
versions of libxml2 provided by OS/package vendors.
************************************************************************
Extracting libxml2-2.9.10.tar.gz into
tmp/x86_64-pc-linux-gnu/ports/libxml2/2.9.10... OK
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/lib/fullstaq-ruby/versions/2.7.1-jemalloc/bin/$(RUBY_BASE_NAME)
        --help
        --clean
        --use-system-libraries
        --enable-static
        --disable-static
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --enable-cross-build
        --disable-cross-build
/usr/local/bundle/ruby/2.7.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:84:in
`apply_patch': Failed to complete patch task; patch(1) or git(1) is required.
(RuntimeError)
from
/usr/local/bundle/ruby/2.7.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:92:in
`block in patch'
from
/usr/local/bundle/ruby/2.7.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:90:in
`each'
from
/usr/local/bundle/ruby/2.7.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:90:in
`patch'
from
/usr/local/bundle/ruby/2.7.0/gems/mini_portile2-2.4.0/lib/mini_portile2/mini_portile.rb:152:in
`cook'
        from extconf.rb:365:in `block (2 levels) in process_recipe'
        from extconf.rb:257:in `block in chdir_for_build'
        from extconf.rb:256:in `chdir'
        from extconf.rb:256:in `chdir_for_build'
        from extconf.rb:364:in `block in process_recipe'
        from extconf.rb:262:in `tap'
        from extconf.rb:262:in `process_recipe'
        from extconf.rb:557:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

/usr/local/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/nokogiri-1.10.10/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/usr/local/bundle/ruby/2.7.0/gems/nokogiri-1.10.10 for inspection.
Results logged to
/usr/local/bundle/ruby/2.7.0/extensions/x86_64-linux/2.7.0/nokogiri-1.10.10/gem_make.out

An error occurred while installing nokogiri (1.10.10), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.10.10' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 6.0.3.2, which depends on
    actioncable was resolved to 6.0.3.2, which depends on
      actionpack was resolved to 6.0.3.2, which depends on
        actionview was resolved to 6.0.3.2, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri
ERROR: Service 'web' failed to build: The command '/bin/bash -o pipefail -c bundle install #--jobs 4' returned a non-zero code: 5

here is the DockerFile

ARG RUBY_VERSION=2.7.1-jemalloc
FROM quay.io/evl.ms/fullstaq-ruby:${RUBY_VERSION}-slim

LABEL project="voxserver"

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
    apt-transport-https \
    gnupg2

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
    apt-get update -yqq && apt-get install -yqq --no-install-recommends \
    nodejs \
    postgresql-client \
    ffmpeg \ 
    sox

RUN apt-get install libsox-fmt-mp3 -y
    

# RUN gem install foreman


RUN apt-get install libimlib2 libimlib2-dev -y

COPY Gemfile* /usr/src/app/ 
WORKDIR /usr/src/app
RUN bundle install #--jobs 4

#
COPY . /usr/src/app/

RUN echo 'PS1="\[$(tput setaf 3)$(tput bold)[\]voxserver:\\w]#\[$(tput sgr0) \]"' >> /root/.bashrc
# RUN echo 'fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p'   #setting this in parent machine!!

COPY delete_pid.sh /usr/bin/
RUN chmod +x /usr/bin/delete_pid.sh
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install yarn
RUN yarn install --check-files

Fullstaq Ruby 2.6.4 version

Hi!

I'm trying your image on a project. I noticed Fullstaq Ruby 2.6.4 has just been released, could you release images for this new version?

Thanks! 😄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.