Skip to content

Docker image regression: slack-api installation fails after 0.34.3 #3897

Description

@DmitryMigunov

Describe the bug

The oxidized/oxidized Docker image versions newer than 0.34.3 fail when installing the slack-api gem.

The slack-api gem depends on websocket-driver, which contains a native extension. The current Docker image does not contain the Ruby development headers required to build this extension.

Additionally, the container entrypoint references /sbin/my_init, which is not present in the newer image.

To Reproduce

  1. Run an oxidized/oxidized Docker image newer than 0.34.3.

  2. Install the slack-api gem:

    gem install slack-api
    
  3. Observe the native extension build failure.

The following error is produced:

Building native extensions. This could take a while...
ERROR:  Error installing slack-api:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/3.3.0/gems/websocket-driver-0.8.2/ext/websocket-driver
/usr/bin/ruby3.3 -I/usr/lib/ruby/vendor_ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

Afterwards, the container entrypoint also fails with:

/cfg/oxidized/entrypoint.sh: line 9: /sbin/my_init: No such file or directory

Expected behavior

The oxidized/oxidized Docker image should either:

  • include the Ruby development packages required to install gems with native extensions, or
  • provide a documented/recommended way to install additional gems such as slack-api.

The default entrypoint should also not reference /sbin/my_init if it is no longer included in the image.

Configuration

Not applicable.

Logs

Successfully installed websocket-extensions-0.1.5
Building native extensions. This could take a while...
ERROR:  Error installing slack-api:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/3.3.0/gems/websocket-driver-0.8.2/ext/websocket-driver
/usr/bin/ruby3.3 -I/usr/lib/ruby/vendor_ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/3.3.0/gems/websocket-driver-0.8.2 for inspection.

Results logged to /var/lib/gems/3.3.0/extensions/x86_64-linux-gnu/3.3.0/websocket-driver-0.8.2/gem_make.out

/cfg/oxidized/entrypoint.sh: line 9: /sbin/my_init: No such file or directory

Running environment (please complete the following information):

  • OS: Docker
  • Docker image: oxidized/oxidized
  • oxidized version: > 0.34.3
  • oxidized-web version: N/A
  • Manufacturer model and software version: N/A
  • oxidized model name: N/A

Additional context

This appears to be a regression in the Docker image introduced after 0.34.3.

The previous image version 0.34.3 does not exhibit this problem, while newer versions use Ruby 3.3 and fail to provide the headers required to build native Ruby extensions.

The issue can potentially be resolved by including the corresponding Ruby development package (e.g. ruby3.3-dev) and build dependencies in the image, or by changing the image/installation approach for additional gems.

The /sbin/my_init error may indicate that the Docker image base image or entrypoint changed while the existing entrypoint configuration still assumes my_init is available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions