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
-
Run an oxidized/oxidized Docker image newer than 0.34.3.
-
Install the slack-api gem:
-
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.
Describe the bug
The
oxidized/oxidizedDocker image versions newer than0.34.3fail when installing theslack-apigem.The
slack-apigem depends onwebsocket-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
Run an
oxidized/oxidizedDocker image newer than0.34.3.Install the
slack-apigem:Observe the native extension build failure.
The following error is produced:
Afterwards, the container entrypoint also fails with:
Expected behavior
The
oxidized/oxidizedDocker image should either:slack-api.The default entrypoint should also not reference
/sbin/my_initif it is no longer included in the image.Configuration
Not applicable.
Logs
Running environment (please complete the following information):
oxidized/oxidized> 0.34.3Additional context
This appears to be a regression in the Docker image introduced after
0.34.3.The previous image version
0.34.3does 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_initerror may indicate that the Docker image base image or entrypoint changed while the existing entrypoint configuration still assumesmy_initis available.