Re:Show HN: dockerc – Docker image to static executable "com...
by Alifatisk on Wednesday March 06, 2024 @04:32PM
(#39621818)
So what does this mean? That I can finally ship portable Ruby executable without requiring the end user to install Ruby?
[ Parent
| on HN ]
Re:Show HN: dockerc – Docker image to static executable "com...
by NilsIRL on Wednesday March 06, 2024 @04:40PM
(#39621939)
Yep! It works with any docker image!*
Re:Show HN: dockerc – Docker image to static executable "com...
by tekknolagi on Wednesday March 06, 2024 @05:56PM
(#39622831)
You should also be able to do that with Cosmopolitan/APE.
Re:Show HN: dockerc – Docker image to static executable "com...
by pacifika on Thursday March 07, 2024 @02:45AM
(#39626281)
Would you be able to expand on this, my impression is that these tools build a custom c program instead? Thanks
Re:Show HN: dockerc – Docker image to static executable "com...
by tekknolagi on Thursday March 07, 2024 @10:08AM
(#39629998)
They provide a compiler and bundled userland that can be used to compile many C programs (even, for example, a slightly patched CPython) for a multi-OS binary distribution. Ruby shouldn't be that different.
Re:Show HN: dockerc – Docker image to static executable "com...
by Alifatisk on Thursday March 07, 2024 @07:33AM
(#39628288)
I've tried to compile Libcello with cosmopolitan with little to no success, I don't think the Ruby runtime will be any easier sadly.
Could also be a skill issue.
Re:Show HN: dockerc – Docker image to static executable "com...
by monfresh on Thursday March 07, 2024 @10:48PM
(#39637574)
You can already do this with these forks of ruby-packer and traveling-ruby:
https://github.com/ericbeland/ruby-packer https://github.com/YOU54F/traveling-ruby
ruby-packer is what I use to distribute a paid CLI, although on macOS only because my product is specifically for customers on macOS.
The advantage of ruby-packer is that it is much simpler, but you need to have access to each OS where you want to distribute your executable. OTOH, with traveling-ruby, you can build executables for all OSes from the same machine.