You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/03/21 17:25:19 UTC
(superset) branch fix_docker_base created (now 772d37ead3)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a change to branch fix_docker_base
in repository https://gitbox.apache.org/repos/asf/superset.git
at 772d37ead3 fix(docker): error around missing requirements/base.txt
This branch includes the following new commits:
new 772d37ead3 fix(docker): error around missing requirements/base.txt
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: fix(docker): error around missing requirements/base.txt
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch fix_docker_base
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 772d37ead363f55b4c2a5b2e15a41495b45991fc
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Thu Mar 21 10:22:14 2024 -0700
fix(docker): error around missing requirements/base.txt
Closes https://github.com/apache/superset/issues/27606
I'm unclear on why exactly CI succeeded while this was an issue running
locally. I'm guessing it has to do with `--mount` and how it works
around caching, so I'm moving to a COPY-based approach, which is more
standard and easy to reason about. It also leaves a useful artefact on
the machine as to how it was built. It does add a tiny layer and payload
on the image, but it's super cheap for the utility/introspection it provides.
---
Dockerfile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index e5387d6779..5e7dceed4d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -61,7 +61,7 @@ ENV LANG=C.UTF-8 \
SUPERSET_HOME="/app/superset_home" \
SUPERSET_PORT=8088
-RUN mkdir -p ${PYTHONPATH} superset/static superset-frontend apache_superset.egg-info requirements \
+RUN mkdir -p ${PYTHONPATH} superset/static requirements superset-frontend apache_superset.egg-info requirements \
&& useradd --user-group -d ${SUPERSET_HOME} -m --no-log-init --shell /bin/bash superset \
&& apt-get update -qq && apt-get install -yqq --no-install-recommends \
build-essential \
@@ -79,8 +79,8 @@ RUN mkdir -p ${PYTHONPATH} superset/static superset-frontend apache_superset.egg
COPY --chown=superset:superset setup.py MANIFEST.in README.md ./
# setup.py uses the version information in package.json
COPY --chown=superset:superset superset-frontend/package.json superset-frontend/
-RUN --mount=type=bind,target=./requirements/base.txt,src=./requirements/base.txt \
- --mount=type=cache,target=/root/.cache/pip \
+COPY --chown=superset:superset requirements/base.txt requirements/
+RUN --mount=type=cache,target=/root/.cache/pip \
pip install --upgrade setuptools pip && \
pip install -r requirements/base.txt
@@ -126,8 +126,9 @@ RUN apt-get update -qq \
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox \
&& apt-get autoremove -yqq --purge wget && rm -rf /var/[log,tmp]/* /tmp/* /var/lib/apt/lists/*
# Cache everything for dev purposes...
-RUN --mount=type=bind,target=./requirements/development.txt,src=./requirements/development.txt \
- --mount=type=cache,target=/root/.cache/pip \
+
+COPY --chown=superset:superset requirements/development.txt requirements/
+RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements/development.txt
USER superset