Mercurial > gemma
annotate docker/Dockerfile.spa @ 506:11d527b3321b
Add Dockerfile for SPA client
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 15:47:27 +0200 |
parents | |
children | 6d7c0dbf9d21 |
rev | line source |
---|---|
506
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 FROM ubuntu:bionic |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 LABEL authors="tom@intevation.de" |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 RUN sed -i 's/$/ universe/' /etc/apt/sources.list |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 RUN apt-get update &&\ |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 apt-get -y install --no-install-recommends curl nodejs |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 # Install yarn |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 RUN curl https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&\ |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 echo 'deb https://dl.yarnpkg.com/debian/ stable main' >> \ |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 /etc/apt/sources.list &&\ |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 apt-get update &&\ |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 apt-get -y install yarn |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 COPY ./client /opt/gemma_spa |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 WORKDIR /opt/gemma_spa |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
19 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 RUN yarn install |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
22 EXPOSE 8080 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
23 |
11d527b3321b
Add Dockerfile for SPA client
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 CMD ["yarn", "serve"] |