-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (42 loc) · 2 KB
/
Copy pathDockerfile
File metadata and controls
57 lines (42 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-License-Identifier: 0BSD
FROM debian:trixie
ENV PHPMYADMIN_VERSION="5.2.3"
# Check for latest version:
# https://sdi.eea.europa.eu/catalogue/srv/eng/catalog.search#/metadata/9405f714-8015-4b5b-a63c-280b82861b3d
# Last data update: 2025-12-15
ENV IEP_URL="https://sdi.eea.europa.eu/datashare/public.php/dav/files/gN8jayNx7igxeMf/User-friendly-CSV/F1_4_Air_Releases_Facilities.csv"
# Latest "Verified Emissions" from
# https://union-registry-data.ec.europa.eu/
# Last data update: 2026-04-01
ENV ETS_URL="https://climate.ec.europa.eu/document/download/53018483-62b3-499e-9ab9-b4a831cc44f4_en?filename=verified_emissions_2025_en.xlsx"
# Linking data
# https://cadmus.eui.eu/entities/publication/d8887cdd-c98c-4ba3-8e91-0710747f4e4e
ENV LINKING_URL="https://cadmus.eui.eu/server/api/core/bitstreams/6723beed-f56f-43e7-8cb4-dc526a62f087/content"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install apache2 mariadb-server \
php libapache2-mod-php php-mysql php-mbstring \
python3-mysqldb python3-pycountry \
wget xz-utils nano less \
xlsx2csv
RUN wget https://files.phpmyadmin.net/phpMyAdmin/${PHPMYADMIN_VERSION}/phpMyAdmin-${PHPMYADMIN_VERSION}-all-languages.tar.xz
RUN rm /var/www/html/index.html
RUN tar --strip-components=1 -xf phpMyAdmin-${PHPMYADMIN_VERSION}-all-languages.tar.xz -C /var/www/html
RUN rm phpMyAdmin-${PHPMYADMIN_VERSION}-all-languages.tar.xz
RUN mkdir /var/www/html/tmp
RUN chown www-data:www-data /var/www/html/tmp
# phpMyAdmin config file
ADD config.inc.php /var/www/html/config.inc.php
RUN mkdir /var/run/mysqld
RUN chown mysql:mysql /var/run/mysqld
RUN sed -e 's:^bind-address:#bind-address:g' -i /etc/mysql/mariadb.conf.d/50-server.cnf
RUN wget -O iepraw.csv "${IEP_URL}"
RUN wget -O etsdata.xlsx "${ETS_URL}"
RUN xlsx2csv -a etsdata.xlsx ets
RUN wget -O linking.csv "${LINKING_URL}"
COPY run.sh mprep.sh iep_schema.sql ets_schema.sql linking_schema.sql simplifydb.py /
RUN ./mprep.sh
RUN rm -r ets/ mprep.sh simplifydb.py *.csv *.sql *.xlsx
CMD ["/run.sh"]
EXPOSE 80
EXPOSE 3306