diff docker/Dockerfile.spa @ 596:6d7c0dbf9d21

Fix running client container with clean checkout in volume The vue CLI Service needs to be installed locally into the project in order to be able to run 'yarn serve'. Use make for dependency installation because the makefile will get updated whenever the process changes. In passing: docs and more robust sources.list adaptation
author Tom Gottfried <tom@intevation.de>
date Fri, 07 Sep 2018 14:43:15 +0200
parents 11d527b3321b
children ed2dd10a94b5
line wrap: on
line diff
--- a/docker/Dockerfile.spa	Fri Sep 07 14:35:18 2018 +0200
+++ b/docker/Dockerfile.spa	Fri Sep 07 14:43:15 2018 +0200
@@ -1,10 +1,10 @@
 FROM ubuntu:bionic
 LABEL authors="tom@intevation.de"
 
-RUN sed -i 's/$/ universe/' /etc/apt/sources.list
+RUN sed -i 's/\(deb.*\)$/\1 universe/' /etc/apt/sources.list
 
 RUN apt-get update &&\
-    apt-get -y install --no-install-recommends curl nodejs
+    apt-get -y install --no-install-recommends curl nodejs make
 
 # Install yarn
 RUN curl https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&\
@@ -17,8 +17,6 @@
 
 WORKDIR /opt/gemma_spa
 
-RUN yarn install
-
 EXPOSE 8080
 
-CMD ["yarn", "serve"]
+CMD make -f Makefile.build dependencies && yarn serve