Sign inSign up

joenyland/ruby-alpine-libv8

By joenyland

•Updated over 8 years ago

Alpine Linux based Ruby Docker image with libv8 gem

Image
0

1.8K

joenyland/ruby-alpine-libv8 repository overview

⁠docker-ruby-alpine-libv8 Docker Build Status

This image is based on the official Ruby image⁠ for Alpine Linux. It contains the libv8⁠ gem installed with a V8 engine that's built against the musl C library⁠ that Alpine Linux uses.

One can, of course, just install NodeJS in Alpine Linux and ExecJS will just use that⁠. If you'd prefer not to use NodeJS, then you can use this image to base your app on.

⁠Example

Here's what happens with the normal Alpine based Ruby image:

docker run -it --rm ruby:alpine sh
apk add build-base
gem install therubyracer
irb(main):001:0> require 'v8'
LoadError: Error relocating /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so: __vfprintf_chk: symbol not found - /usr/local/bundle/gems/therubyracer-0.12.3/lib/v8/init.so

And here's it working with this image:

docker run -it --rm joenyland/ruby-alpine-libv8
apk add build-base
gem install therubyracer
irb(main):001:0> require 'v8'
=> true
irb(main):002:0> V8::Context.new.eval 5 * 9
=> 45

⁠Contributing

  • Any issues, please file a new issue here⁠.
  • Happy to accept pull requests: please raise one here⁠.

Tag summary

Content type

Image

Digest

Size

66.5 MB

Last updated

over 8 years ago

docker pull joenyland/ruby-alpine-libv8