瀏覽代碼

[demo] upgrade demo site Dockerfile to Python 3.11 and update dependencies (#4186)

Ayush Goyal 4 月之前
父節點
當前提交
ada61b276a
共有 1 個文件被更改,包括 18 次插入18 次删除
  1. 18 18
      tools/docker/hue/Dockerfile

+ 18 - 18
tools/docker/hue/Dockerfile

@@ -1,16 +1,19 @@
 # Welcome to Hue (http://gethue.com) Dockerfile
 
-FROM ubuntu:20.04
+FROM ubuntu:22.04
 LABEL description="Hue SQL Assistant - gethue.com"
 
 ENV DEBIAN_FRONTEND=noninteractive
 
 RUN apt-get update -y && apt-get install -y \
+  python3.11 \
+  python3.11-venv \
+  python3.11-dev \
+  python3.11-distutils \
   python3-pip \
   libkrb5-dev  \
   libsasl2-modules-gssapi-mit \
   libsasl2-dev \
-  libkrb5-dev \
   krb5-config \
   krb5-user \
   libxml2-dev \
@@ -18,9 +21,8 @@ RUN apt-get update -y && apt-get install -y \
   libmysqlclient-dev \
   libldap2-dev \
   libsnappy-dev \
-  python3.8-venv \
-  python3.8-dev \
-  python3.8-distutils \
+  libffi-dev \
+  pkg-config \
   rsync \
   curl \
   sudo \
@@ -31,7 +33,7 @@ ADD . /hue
 
 RUN pip3 install --upgrade --no-cache-dir setuptools virtualenv pip && \
   apt-get install -y curl && \
-  curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
+  curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
   apt-get install -y nodejs && \
   addgroup hue && \
   useradd -r -u 1001 -g hue hue && \
@@ -44,11 +46,11 @@ RUN pip3 install --upgrade --no-cache-dir setuptools virtualenv pip && \
   cp -r /hue/desktop/conf.dist /hue/desktop/conf && \
   mkdir -m 755 /var/log/hue && \
   cd /hue && \
-  ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3.8 && \
-  ln -fs /usr/local/bin/pip3.8 /usr/bin/pip3 && \
+  ln -fs /usr/local/bin/pip3.11 /usr/bin/pip3.11 && \
+  ln -fs /usr/local/bin/pip3.11 /usr/bin/pip3 && \
   PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \
-  PREFIX=/usr/share ROOT=/usr/share/hue PYTHON_VER=python3.8 ROOT=/hue \
-  SYS_PYTHON=/usr/bin/python3.8 SYS_PIP=/usr/local/bin/pip3.8 make apps install && \
+  PREFIX=/usr/share INSTALL_DIR=/usr/share/hue ROOT=/usr/share/hue PYTHON_VER=python3.11 \
+  SYS_PYTHON=/usr/bin/python3.11 SYS_PIP=/usr/local/bin/pip3.11 make apps install && \
   chown -R hue /usr/share/hue && \
   npm cache clean --force && \
   pip cache purge && \
@@ -67,8 +69,8 @@ WORKDIR /usr/share/hue
 RUN ./build/env/bin/pip install --no-cache-dir \
   psycopg2-binary \
   # Avoid Django 3 pulling \
-  django_redis==4.11.0 \
-  flower==0.9.7 \
+  django_redis==5.4.0 \
+  flower==2.0.1 \
   # Contains fix for SparkSql show tables \
   git+https://github.com/gethue/PyHive \
   #ksql \
@@ -76,9 +78,9 @@ RUN ./build/env/bin/pip install --no-cache-dir \
   pydruid \
   # pybigquery \
   elasticsearch-dbapi \
-  pyasn1==0.4.1 \
+  pyasn1==0.6.1 \
   # View some parquet files \
-  python-snappy==0.5.4 \
+  python-snappy==0.7.3 \
   # Needed for Jaeger \
   threadloop \
   # Fix Can't load plugin: sqlalchemy.dialects:clickhouse \
@@ -87,10 +89,8 @@ RUN ./build/env/bin/pip install --no-cache-dir \
   # install after sqlalchemy-clickhouse and version == 1.0.4 \
   # otherwise Code: 516, Authentication failed will display \
   infi.clickhouse_orm==1.0.4 \
-  mysqlclient==2.1.1 \
-  PyAthena==2.25.2
-  # PyAthena == 3.x.x is latest, but not working with current configuration \
-  # otherwise, 'VisitableType' object is not subscriptable in Hue UI
+  mysqlclient==2.2.7 \
+  PyAthena==3.14.1
 
 USER hue