Mercurial > gemma
annotate Dockerfile @ 492:5a9dde6951ae
fix: N.N as Username is now a placeholder
See Issue104
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 24 Aug 2018 14:21:46 +0200 |
parents | 01deefb7ec7a |
children |
rev | line source |
---|---|
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 FROM ubuntu:bionic |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 LABEL authors="tom.gottfried@intevation.de" |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 RUN sed -i 's/$/ universe/' /etc/apt/sources.list |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 RUN apt-get update &&\ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 apt-get -y install --no-install-recommends \ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 make git golang-go golang-github-gorilla-context-dev |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 WORKDIR /opt/gemma |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 # Copy only backend stuff |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 COPY 3rdpartylibs.sh ./ |
414
c1047fd04a3a
Moved project specific Go packages to new pkg folder.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
402
diff
changeset
|
14 COPY pkg ./pkg/ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 COPY cmd ./cmd/ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 COPY Makefile ./ |
318
1a2dfd9351e9
Add example configuration and use it in dockerised backend
Tom Gottfried <tom@intevation.de>
parents:
309
diff
changeset
|
17 COPY example_conf.toml ./ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
360
diff
changeset
|
19 RUN make install |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 EXPOSE 8000 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
22 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
360
diff
changeset
|
23 CMD ["/usr/local/bin/gemma", "-c", "/opt/gemma/example_conf.toml"] |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
25 # Run with e.g. |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 # docker build -t gemma_backend . |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 # docker run --name gemma_backend -v $PWD:/opt/gemma -d -p 8200:8000 \ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 # --link your_gemma_db:gemma_db gemma_backend |
458 | 29 # --link your_gemma_geoserver:gemma_geoserver gemma_backend |