omkarcloud / botasaurus-dockerfile

Dockerfile for Botasaurus
https://www.omkar.cloud/
MIT License
4 stars 3 forks source link

Is this Dockerfile from the deployed version at hub.docker.com/r/chetan1111/botasaurus ? #1

Open therealpurplemana opened 1 month ago

therealpurplemana commented 1 month ago

Is this Dockerfile different from https://hub.docker.com/r/chetan1111/botasaurus ?

I am not able to download and install chrome in a Docker using the methods shown here. It seems to have broken a few months ago and I'm curious how you may have solved it.

Anthonvg commented 1 week ago

Is this Dockerfile different from https://hub.docker.com/r/chetan1111/botasaurus ?

I am not able to download and install chrome in a Docker using the methods shown here. It seems to have broken a few months ago and I'm curious how you may have solved it.

I solved it like this

FROM nikolaik/python-nodejs:python3.12-nodejs18-slim

WORKDIR /app

COPY . /app

RUN apt-get update && apt-get install -y \
    wget \
    gnupg2 \
    lsof \
    apt-transport-https \
    ca-certificates \
    x11-utils \
    xdg-utils \
    xvfb \
    software-properties-common \
    fonts-liberation \
    libasound2 \
    libatk-bridge2.0-0 \
    libatk1.0-0 \
    libatspi2.0-0 \
    libcups2 \
    libdbus-1-3 \
    libdrm2 \
    libgbm1 \
    libgtk-3-0 \
    libnspr4 \
    libnss3 \
    libwayland-client0 \
    libxcomposite1 \
    libxdamage1 \
    libxfixes3 \
    libxkbcommon0 \
    libxrandr2 \
    xdg-utils \
    libu2f-udev \
    libvulkan1 \
    --no-install-recommends \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
    apt-get install -y ./google-chrome-stable_current_amd64.deb && \
    apt-get -f install -y && \
    rm google-chrome-stable_current_amd64.deb

RUN echo "Chrome: " && google-chrome --version

ENV CHROME_BIN=/usr/bin/google-chrome

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8000

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]