# Step1
sudo apt-get install -y libfontconfig1 unzip libnss3 libx11-6 libx11-xcb1
sudo apt-get -f install
# Step2
curl -kLo google-chrome-stable_current_amd64.deb -x amazon.proxy.crawling.coupang.net:8080 https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& sudo dpkg -i ./google-chrome-stable_current_amd64.deb \
&& rm ./google-chrome-stable_current_amd64.deb
mkdir -p /home/usr/chrome/ \
&& curl -kLo chromedriver.zip https://chromedriver.storage.googleapis.com/108.0.5359.22/chromedriver_linux64.zip -x amazon.proxy.crawling.coupang.net:8080 \
&& unzip chromedriver.zip \
&& mv chromedriver /home/usr/chrome/chromedriver \
&& chmod 0755 /home/usr/chrome/chromedriver \
&& rm chromedriver.zip
# Step3
pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org setuptools-rust
pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip
pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org pyOpenSSL==22.0.0
pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org selenium==3.141.0
pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org selenium-wire==4.6.5
|
Mac
curl -SL https://chromedriver.storage.googleapis.com/107.0.5304.62/chromedriver_mac64.zip > chromedriver.zip
/bin/echo "y" | unzip chromedriver.zip -d macbin/
chmod 755 macbin/chromedriver
cp macbin/chromedriver /usr/local/bin/chromedriver
rm chromedriver.zip
rm -rf macbin
|
IDC
Docker
FROM ubuntu:18.04
RUN apt clean && apt-get update
RUN apt-get install -y apt-utils
RUN apt-get -y upgrade
RUN apt-get install -y apt-transport-https \
ca-certificates \
gnupg2 \
wget \
software-properties-common \
python-pip \
python-dev \
python3-dev \
python3-pip \
python-setuptools \
apt-transport-https \
build-essential \
default-libmysqlclient-dev \
apt-utils \
sudo \
lxc \
curl \
vim \
ca-certificates \
redis-tools \
jq
ENV PYTHONIOENCODING utf-8
RUN apt-get update && apt-get install -y libfontconfig1 unzip libnss3 libx11-6 libx11-xcb1
RUN mkdir -p /home/usr/chrome
RUN curl -kLo chromedriver.zip https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_linux64.zip \
&& unzip chromedriver.zip \
&& mv chromedriver /home/usr/chrome/chromedriver \
&& chmod 0755 /home/usr/chrome/chromedriver \
&& rm chromedriver.zip
RUN curl -kLo headless-chromium.zip https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-57/stable-headless-chromium-amazonlinux-2.zip \
&& unzip headless-chromium.zip \
&& mv headless-chromium /home/usr/chrome/headless-chromium \
&& chmod 0755 /home/usr/chrome/headless-chromium \
&& rm headless-chromium.zip
RUN pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org setuptools-rust RUN pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip
RUN pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org pyOpenSSL==22.0.0
RUN pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org selenium==3.141.0
RUN pip3 install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org selenium-wire==4.6.5
|
'Python' 카테고리의 다른 글
Selenium Wire Option (2) | 2022.12.11 |
---|---|
Selenium Chrome Option (0) | 2022.12.11 |
pip 설치시, SSL 오류 (0) | 2022.04.02 |
PynamoDB (0) | 2021.11.10 |
Python Proxy (0) | 2021.11.03 |