potiuk commented on a change in pull request #4543: [AIRFLOW-3718] [WIP/SPLIT] 
Multi-layered version of the docker image
URL: https://github.com/apache/airflow/pull/4543#discussion_r267803892
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -70,6 +70,16 @@ COPY --from=wheel-cache /cache /cache
 RUN pip install ${PIP_CACHE_DIRECTIVE} --upgrade pip==19.0.1 && \
     pip install ${PIP_CACHE_DIRECTIVE} --no-use-pep517 -e ".[${EXTRAS}]"
 
+# Install necessary NPM dependencies - also taking into account only changes 
in package.json
+COPY airflow/www/ /opt/airflow/airflow/www/
+
+WORKDIR /opt/airflow/airflow/www
+
+RUN npm ci \
 
 Review comment:
   OK. I changed it in the latest push in #4932 I fixed it in the way that npm 
install && npm run prod are run inside the container when you enter it - in 
case when the "node_modules" and "dist" folders do not exist (i.e. when the 
sources are mounted from the host and npm was never run on the host). I think 
that should cover the most common use case for development and this way we 
avoid the case that modules/prepared .js files are missing. The user will still 
be able to run "npm install && run prod inside the container" manually (or even 
outside!).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to