2019-07-04 01:33:14 -04:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
2023-06-28 10:40:10 -04:00
|
|
|
FROM python:3.9-buster
|
2019-07-04 01:33:14 -04:00
|
|
|
|
|
|
|
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset
|
|
|
|
|
|
|
|
# Configure environment
|
|
|
|
ENV LANG=C.UTF-8 \
|
|
|
|
LC_ALL=C.UTF-8
|
|
|
|
|
|
|
|
RUN apt-get update -y
|
|
|
|
|
2023-01-25 18:35:08 -05:00
|
|
|
# Install dependencies to fix `curl https support error` and `delaying package configuration warning`
|
2019-07-04 01:33:14 -04:00
|
|
|
RUN apt-get install -y apt-transport-https apt-utils
|
|
|
|
|
|
|
|
# Install superset dependencies
|
2020-12-18 07:04:33 -05:00
|
|
|
# https://superset.apache.org/docs/installation/installing-superset-from-scratch
|
2019-07-04 01:33:14 -04:00
|
|
|
RUN apt-get install -y build-essential libssl-dev \
|
2022-07-13 18:53:31 -04:00
|
|
|
libffi-dev python3-dev libsasl2-dev libldap2-dev libxi-dev chromium
|
2019-07-04 01:33:14 -04:00
|
|
|
|
|
|
|
# Install nodejs for custom build
|
|
|
|
# https://nodejs.org/en/download/package-manager/
|
2022-04-04 06:40:39 -04:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
|
2019-07-04 01:33:14 -04:00
|
|
|
&& apt-get install -y nodejs
|
|
|
|
|
|
|
|
RUN mkdir -p /home/superset
|
|
|
|
RUN chown superset /home/superset
|
|
|
|
|
|
|
|
WORKDIR /home/superset
|
|
|
|
ARG VERSION
|
2019-11-19 10:44:38 -05:00
|
|
|
ARG SUPERSET_RELEASE_RC_TARBALL
|
2019-07-04 01:33:14 -04:00
|
|
|
|
2019-11-19 10:44:38 -05:00
|
|
|
# Can fetch source from svn or copy tarball from local mounted directory
|
|
|
|
COPY $SUPERSET_RELEASE_RC_TARBALL ./
|
2019-07-04 01:33:14 -04:00
|
|
|
RUN tar -xvf *.tar.gz
|
2020-12-18 07:04:33 -05:00
|
|
|
WORKDIR /home/superset/apache-superset-$VERSION/superset-frontend
|
2019-07-04 01:33:14 -04:00
|
|
|
|
2019-11-19 10:44:38 -05:00
|
|
|
RUN npm ci \
|
2019-07-04 01:33:14 -04:00
|
|
|
&& npm run build \
|
|
|
|
&& rm -rf node_modules
|
|
|
|
|
2020-12-18 07:04:33 -05:00
|
|
|
WORKDIR /home/superset/apache-superset-$VERSION
|
2019-07-04 01:33:14 -04:00
|
|
|
RUN pip install --upgrade setuptools pip \
|
2020-10-28 14:17:33 -04:00
|
|
|
&& pip install -r requirements/base.txt \
|
2019-11-15 08:44:07 -05:00
|
|
|
&& pip install --no-cache-dir .
|
2019-07-04 01:33:14 -04:00
|
|
|
|
2019-11-05 03:44:06 -05:00
|
|
|
RUN flask fab babel-compile --target superset/translations
|
2019-07-04 01:33:14 -04:00
|
|
|
|
|
|
|
ENV PATH=/home/superset/superset/bin:$PATH \
|
2023-03-17 20:39:37 -04:00
|
|
|
PYTHONPATH=/home/superset/superset/:$PYTHONPATH \
|
|
|
|
SUPERSET_TESTENV=true
|
2019-07-04 01:33:14 -04:00
|
|
|
COPY from_tarball_entrypoint.sh /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|