Coder Social home page Coder Social logo

Comments (2)

Bannerets avatar Bannerets commented on June 13, 2024

Hi! The /tmp/xfs-51811beb/build.log log file should describe what is missing. I think the most likely cause is: tdl includes a node addon that is pre-built for glibc-based linux distributions (as noted in the README), but needs to be built from source on musl-based distributions like alpine, requiring a C++ toolchain (and python) to be installed on the system, which the image probably doesn't contain out of the box.

So, you can fix it either by moving to e.g. debian or ubuntu, for example by replacing FROM node:18-alpine with FROM node:18-bookworm (just in case, prebuit-tdlib also doesn't support alpine) or installing the build tools on alpine, something like RUN apk update && apk add gcc g++ python make should work (the dockerfile can be split into two steps to reduce the size of the final image).

Note that to run the app in the container, you also need TDLib built for the system you use there, so brew install tdlib on the host machine wouldn't be sufficient.

from tdl.

vorant94 avatar vorant94 commented on June 13, 2024

Hi! The /tmp/xfs-51811beb/build.log log file should describe what is missing. I think the most likely cause is: tdl includes a node addon that is pre-built for glibc-based linux distributions (as noted in the README), but needs to be built from source on musl-based distributions like alpine, requiring a C++ toolchain (and python) to be installed on the system, which the image probably doesn't contain out of the box.

So, you can fix it either by moving to e.g. debian or ubuntu, for example by replacing FROM node:18-alpine with FROM node:18-bookworm (just in case, prebuit-tdlib also doesn't support alpine) or installing the build tools on alpine, something like RUN apk update && apk add gcc g++ python make should work (the dockerfile can be split into two steps to reduce the size of the final image).

Note that to run the app in the container, you also need TDLib built for the system you use there, so brew install tdlib on the host machine wouldn't be sufficient.

thanks, changing base image to node:18-bookworm worked!

regarding that tdlib on host machine is not enough i am aware of it. i plan to pack it separately from the app in a container on its own, connect tdl to it and then clean up host machine, so it will be always both locally and in prod deployed via docker. but in order to move forward with actual app code I postponed this stuff. the whole docker build issue raised now only because i wanted to setup github actions to be sure i don't push broken code

thank you once more for the help, have a nice day

from tdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.