Skip to content

Commit

Permalink
docs: update docker container and celery worker chrome installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Malcolm committed Jun 20, 2024
1 parent 313ee59 commit f63348c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 26 deletions.
32 changes: 19 additions & 13 deletions docs/docs/configuration/alerts-reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,28 @@ USER superset
### Using Chrome

```docker
FROM apache/superset:3.1.0
USER root
ARG SUPERSET_IMAGE=3.1.3
FROM docker.io/apache/superset:${SUPERSET_IMAGE}
RUN apt-get update && \
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb && \
rm -f google-chrome-stable_current_amd64.deb
ARG CHROME_VERSION=115.0.5765.0
RUN export CHROMEDRIVER_VERSION=$(curl --silent https://chromedriver.storage.googleapis.com/LATEST_RELEASE_102) && \
wget -q https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip -d /usr/bin && \
chmod 755 /usr/bin/chromedriver && \
rm -f chromedriver_linux64.zip
USER root
RUN pip install --no-cache gevent psycopg2 redis
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl unzip jq \
libglib2.0-0 libnss3 libxcb1 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN curl -s -O -O \
$(curl -s \
https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json \
| jq -r '.versions[] | select(.version == "'${CHROME_VERSION}'") | .downloads | [.chrome, .chromedriver][] | .[] | select(.platform == "linux64") | .url') \
&& unzip -q -j -d /usr/local/bin chromedriver-linux64.zip \
&& unzip -q -j -d /usr/local/bin chrome-linux64.zip \
&& rm chromedriver-linux64.zip chrome-linux64.zip
USER superset
```
Expand Down
29 changes: 16 additions & 13 deletions docs/docs/installation/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -323,19 +323,22 @@ supersetWorker:
- -c
- |
# Install chrome webdriver
# See https://github.com/apache/superset/blob/4fa3b6c7185629b87c27fc2c0e5435d458f7b73d/docs/src/pages/docs/installation/email_reports.mdx
apt-get update
apt-get install -y wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb
wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip
apt-get install -y zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
mv chromedriver /usr/bin
apt-get autoremove -yqq --purge
apt-get clean
rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip
# See https://github.com/apache/superset/blob/master/docs/docs/configuration/alerts-reports.mdx
export CHROME_VERSION=115.0.5765.0
apt-get update \
&& apt-get install -y --no-install-recommends \
curl unzip jq \
libglib2.0-0 libnss3 libxcb1 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
curl -s -O -O \
$(curl -s \
https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json \
| jq -r '.versions[] | select(.version == "'${CHROME_VERSION}'") | .downloads | [.chrome, .chromedriver][] | .[] | select(.platform == "linux64") | .url') \
&& unzip -q -j -d /usr/local/bin chromedriver-linux64.zip \
&& unzip -q -j -d /usr/local/bin chrome-linux64.zip \
&& rm chromedriver-linux64.zip chrome-linux64.zip
# Run
. {{ .Values.configMountPath }}/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker
Expand Down

0 comments on commit f63348c

Please sign in to comment.