Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
therealpurplemana opened this issue Sep 17, 2024 · 1 comment

Comments

@therealpurplemana
Copy link

therealpurplemana commented Sep 17, 2024

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
Copy link

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"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants