gjcarneiro / yacron

A modern Cron replacement that is Docker-friendly
MIT License
449 stars 38 forks source link

Cannot run the binary in alpine linux #66

Open beeyev opened 2 years ago

beeyev commented 2 years ago

Hello, forts of all, thanks for a great tool, it is one of the best tools I have ever used!

I am trying to use yacron in alpine Linux inside docker container. To keep the container as small as possible, I am using the compiled binary, but unfortunately it does not work in alpine. Is there any possible way how to make it work without installing Python to the system?

ldd utility shows this

 ldd yacron
        /lib64/ld-linux-x86-64.so.2 (0x7ffa9788d000)
        libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7ffa9788d000)
        libz.so.1 => /lib/libz.so.1 (0x7ffa97873000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7ffa9788d000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7ffa9788d000)
Error relocating yacron: __strcat_chk: symbol not found
Error relocating yacron: __snprintf_chk: symbol not found
Error relocating yacron: __vfprintf_chk: symbol not found
Error relocating yacron: __realpath_chk: symbol not found
Error relocating yacron: __strdup: symbol not found
Error relocating yacron: __memcpy_chk: symbol not found
Error relocating yacron: __vsnprintf_chk: symbol not found
Error relocating yacron: __strcpy_chk: symbol not found
Error relocating yacron: __fread_chk: symbol not found
Error relocating yacron: __fprintf_chk: symbol not found
gjcarneiro commented 2 years ago

I have never tried this, but maybe you can try this solution and check if it works?

Failing that, the only other options are:

  1. install from source (check readme)
  2. try to modify the dockerfile that builds the binary and make it based off Alpine instead of Ubuntu.
beeyev commented 2 years ago
  1. Is a great Idea, will try it.