Mercurial > dive4elements > river
annotate docker/Dockerfile.mapserv @ 9796:13351afee667 3.2.x
Set locale in client container
Improves logging of non-ASCII characters.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 02 Nov 2023 17:48:58 +0100 |
parents | 0834c2591e14 |
children |
rev | line source |
---|---|
9734
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 # Docker file for D4E River MapServer |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 # with support for PostgreSQL and Oracle databases |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 FROM centos:7 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 MAINTAINER tom@intevation.de |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 # Necessary to run further yum-installs inside Docker container, |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 # if not already part of the base image: |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 RUN yum -q -y install yum-plugin-ovl && rpm --rebuilddb |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 # Install prerequisites |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 RUN yum -q -y install curl ca-certificates epel-release \ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 gnu-free-sans-fonts httpd |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 RUN yum -q -y install gcc-c++ postgresql-devel gd-devel giflib-devel proj-devel \ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 proj-epsg prelink make |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
17 # Install Oracle client |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
18 RUN curl -s https://yum.oracle.com/RPM-GPG-KEY-oracle-ol7 \ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
19 -o /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
20 ADD ol7-temp.repo /etc/yum.repos.d/ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
21 RUN yum -q -y install oraclelinux-release-el7 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
22 RUN mv /etc/yum.repos.d/ol7-temp.repo /etc/yum.repos.d/ol7-temp.repo.disabled |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
23 RUN yum -q -y install oracle-release-el7 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
24 RUN yum -q -y install oracle-instantclient19.9-basic \ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
25 oracle-instantclient19.9-devel |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
26 RUN yum-config-manager --disable oracle*,ol7* |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
27 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
28 # Install MapServer |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
29 WORKDIR /opt/mapserver |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
30 RUN curl -s https://download.osgeo.org/mapserver/mapserver-6.0.6.tar.gz | tar xz |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
31 WORKDIR mapserver-6.0.6 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
32 RUN sed -i "s@oracle/10\*/client@oracle/19.9/client64@g" configure |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
33 RUN ./configure -q --with-proj --with-postgis --with-oraclespatial=/usr \ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
34 CFLAGS=-w CXXFLAGS=-w |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
35 RUN make -s |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
36 WORKDIR /opt/mapserver |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
37 RUN ln -s mapserver-6.0.6/mapserv |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
38 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
39 # Volume to share mapfiles with artifact server. |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
40 # Has to be the same path as in artifact server container because mapfiles |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
41 # contain absolute paths. |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
42 VOLUME /opt/d4e/bin |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
43 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
44 # CGI scripts |
9749
68c6fe74a276
Allow changing CGI scripts without re-building
Tom Gottfried <tom@intevation.de>
parents:
9734
diff
changeset
|
45 ADD mapserver/cgi-bin /var/www/cgi-bin |
9734
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
46 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
47 # httpd config |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
48 ADD httpd-mapserver.conf /etc/httpd/conf.d/ |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
49 |
95496d21b4da
Add MapServer to Docker setup
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
50 CMD ["/usr/sbin/httpd", "-DFOREGROUND"] |