Back

APT-GET / APT not found on build in server function

  • 0
  • Functions
  • Cloud
celeroncoder
25 Jun, 2024, 20:04

Runtime: Python 3.0 Build Command

TypeScript
pip install -r requirements.txt && apt --assume-yes install curl && curl -o driver.zip https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.126/linux64/chromedriver-linux64.zip && apt --assume-yes install unzip && unzip driver.zip -d driver && echo 'export PATH=$PATH:$(pwd)/driver/chromedriver-linux64/' >> ~/.bash_profile && source source ~/.bash_profile && chromedriver --version && echo "Done!!"

I'm using the selenium to scrape a website and I want the chromium driver for it to work, but I can't get to install it, because curl is not there, apt-get/apt is not there to install curl.

I know that these build are inside Docker, but can u help me get a way around or find the docker specification for these builds.

TL;DR
Problem: Developer experiencing trouble installing curl on an Alpine-based runtime server which does not have apt or apt-get. Solution: Since the runtime is Alpine-based, use `apk` instead of `apt` to install packages. Update the build command accordingly. Verify that the necessary dependencies are installed within the runtime container.
Steven
25 Jun, 2024, 20:09

That runtime is alpine based so you would need to use apk. besides that, you'll need to make sure whatever is installed in the runtime container

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more