Pārlūkot izejas kodu

HUE-8687 [docker] Temp fix until npm-install can use PREFIX

Romain 6 gadi atpakaļ
vecāks
revīzija
e7c7c55624
1 mainītis faili ar 14 papildinājumiem un 2 dzēšanām
  1. 14 2
      tools/docker/hue/Dockerfile

+ 14 - 2
tools/docker/hue/Dockerfile

@@ -43,13 +43,25 @@ RUN rm desktop/conf/*
 COPY desktop/conf.dist desktop/conf
 
 # Need recent version for Ubuntu
-RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
-RUN apt-get install -y nodejs
+RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - \
+  && apt-get install -y nodejs
 
 RUN PREFIX=/usr/share make install
 RUN useradd -ms /bin/bash hue && chown -R hue /usr/share/hue
 
 WORKDIR  /usr/share/hue
+
+# Temp fix until npm-install target can use PREFIX in make install
+RUN cp /hue/package.json .
+RUN cp /hue/webpack.config*.js ./
+RUN npm install
+RUN npm run webpack
+RUN npm run webpack-login
+RUN npm run webpack-workers
+RUN ./build/env/bin/hue collectstatic --noinput
+
+RUN rm -rf /hue
+
 RUN ./build/env/bin/pip install psycopg2-binary
 
 COPY tools/docker/hue/conf desktop/conf