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_r263905204
##########
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:
True :). Install seems to be quite obvious candidate to install locked
versions of packages. In fact it seems it used to work like that before NPM
5.1. This is one of the highest voted Slack questions/answers I stumbled upon
recently:
https://stackoverflow.com/questions/45022048/why-does-npm-install-rewrite-package-lock-json
----------------------------------------------------------------
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