forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moving Docker stuff around * docker-compose working as expected * Updating README * Addressing comments * Utilizing requirements-extra
- Loading branch information
1 parent
69dcaca
commit fce4968
Showing
16 changed files
with
366 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,4 @@ install/ | |
superset/assets/node_modules/ | ||
superset/assets/cypress/ | ||
superset/assets/coverage/ | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
ARG PY_VER=3.6.9 | ||
FROM python:${PY_VER} AS superset-py | ||
|
||
RUN mkdir /app \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
default-libmysqlclient-dev \ | ||
libpq-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY ./requirements.txt ./docker/requirements-extra.txt ./setup.py ./MANIFEST.in ./README.md ./app/ | ||
COPY superset /app/superset | ||
|
||
RUN cd /app \ | ||
&& pip install --upgrade setuptools pip \ | ||
&& pip install -r requirements.txt -r requirements-extra.txt \ | ||
&& pip install -e . | ||
|
||
|
||
FROM node:10-jessie AS superset-node | ||
|
||
COPY ./superset/assets /app/superset/assets | ||
|
||
RUN cd /app/superset/assets \ | ||
&& npm ci \ | ||
&& npm run build \ | ||
&& rm -rf node_modules | ||
|
||
# Final lean image... | ||
ARG PY_VER=3.6.9 | ||
FROM python:${PY_VER} | ||
|
||
ENV LANG=C.UTF-8 \ | ||
LC_ALL=C.UTF-8 \ | ||
FLASK_ENV=production \ | ||
FLASK_APP="superset.app:create_app()" \ | ||
PYTHONPATH="/app/pythonpath" \ | ||
SUPERSET_HOME="/app/superset_home" \ | ||
SUPERSET_PORT=8080 | ||
|
||
RUN useradd --user-group --no-create-home --no-log-init --shell /bin/bash superset \ | ||
&& mkdir -p ${SUPERSET_HOME} ${PYTHONPATH} \ | ||
&& chown -R superset:superset /app \ | ||
&& apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
default-libmysqlclient-dev \ | ||
libpq-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=superset-py --chown=superset:superset /app/superset /app/superset | ||
COPY --from=superset-py /usr/local/lib/python3.6/site-packages/ /usr/local/lib/python3.6/site-packages/ | ||
# Copying site-packages doesn't move the CLIs, so let's copy them one by one | ||
COPY --from=superset-py /usr/local/bin/superset /usr/local/bin/gunicorn /usr/local/bin/celery /usr/local/bin/flask /usr/bin/ | ||
COPY --from=superset-py /app/apache_superset.egg-info /app/apache_superset.egg-info | ||
|
||
COPY --from=superset-node /app/superset/assets /app/superset/assets | ||
|
||
COPY ./docker/docker-entrypoint.sh /usr/bin/ | ||
|
||
WORKDIR /app | ||
|
||
USER superset | ||
|
||
HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"] | ||
|
||
EXPOSE ${SUPERSET_PORT} | ||
|
||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.