Mercurial > gemma
annotate docker/Dockerfile.backend @ 5610:a826d84485c8 erdms2
Use token server to fetch token for ERDMS requests.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 31 Oct 2022 19:05:28 +0100 |
parents | b61979b74d82 |
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" |
1356
ce24990b3d5c
add licensing hint to docker files
Bernhard Reiter <bernhard@intevation.de>
parents:
561
diff
changeset
|
3 LABEL description="Contains software from gemma, for right holders and\ |
ce24990b3d5c
add licensing hint to docker files
Bernhard Reiter <bernhard@intevation.de>
parents:
561
diff
changeset
|
4 licensing infos, see https://hg.intevation.de/gemma ." |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
561
8f075ae6cf33
Improve docker usage and related docs
Tom Gottfried <tom@intevation.de>
parents:
458
diff
changeset
|
6 RUN sed -i 's/\(deb.*\)$/\1 universe/' /etc/apt/sources.list |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 |
4522
7fb29172befa
Fixed docker file for backend.
Raimund Renkert <raimund@renkert.org>
parents:
4467
diff
changeset
|
8 RUN apt-get update && apt-get install -y software-properties-common |
4601
b61979b74d82
Fix backend docker build
Tom Gottfried <tom@intevation.de>
parents:
4522
diff
changeset
|
9 RUN add-apt-repository -y ppa:longsleep/golang-backports &&\ |
4465
0ad75dd3d77c
Adjusted dockerfile for backend to use latest Go release and Go modules. Untested!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2893
diff
changeset
|
10 apt-get update &&\ |
2266
153c77e529dc
Dockerfile.backend: Added libxml2-utils.
Bjoern Schilberg <bjoern@intevation.de>
parents:
1584
diff
changeset
|
11 apt-get -y install --no-install-recommends libxml2-utils\ |
1584
5d9e0adf73d1
Docker backend: No need to install gorilla context from distro.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1578
diff
changeset
|
12 make git golang-go \ |
1578 | 13 ca-certificates |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 WORKDIR /opt/gemma |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 # Copy only backend stuff |
4465
0ad75dd3d77c
Adjusted dockerfile for backend to use latest Go release and Go modules. Untested!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2893
diff
changeset
|
18 COPY go.mod ./ |
0ad75dd3d77c
Adjusted dockerfile for backend to use latest Go release and Go modules. Untested!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2893
diff
changeset
|
19 COPY go.sum ./ |
414
c1047fd04a3a
Moved project specific Go packages to new pkg folder.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
402
diff
changeset
|
20 COPY pkg ./pkg/ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 COPY cmd ./cmd/ |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
22 COPY Makefile ./ |
318
1a2dfd9351e9
Add example configuration and use it in dockerised backend
Tom Gottfried <tom@intevation.de>
parents:
309
diff
changeset
|
23 COPY example_conf.toml ./ |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 |
402
20d2edbc863d
Add install target for backend and use in Dockerfile
Tom Gottfried <tom@intevation.de>
parents:
360
diff
changeset
|
25 RUN make install |
308
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 EXPOSE 8000 |
e964c617265e
Add Dockerfile for gemma backend
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 |
2893
a6f18b3ccab1
Revert accidental parts of rev. 718ec88fbeed
Tom Gottfried <tom@intevation.de>
parents:
2796
diff
changeset
|
29 CMD ["/usr/local/bin/gemma", "-c", "/opt/gemma/example_conf.toml"] |