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

 ##########
 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:
   ```
   npm config set prefix /cache/node_modules/
   
   COPY --chown=airflow:airflow airflow/www/package.json 
/cache/node_modules/package.json
   COPY --chown=airflow:airflow airflow/www/package-lock.json 
/cache/node_modules/package-lock.json
   
   # Install necessary NPM dependencies (triggered by changes in 
package-lock.json)
   RUN npm ci --global
   
   COPY --chown=airflow:airflow airflow/www/ /opt/airflow/airflow/www/
   
   # Package NPM for production
   RUN npm run prod
   
   ```

----------------------------------------------------------------
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