aitch commited on
Commit
8cd4f77
1 Parent(s): 2dced5e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +49 -0
Dockerfile ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM debian:bullseye-slim
2
+
3
+ ENV LANG=en_EN.UTF-8
4
+
5
+ RUN apt-get update \
6
+ && apt-get install --no-install-recommends --no-install-suggests --allow-unauthenticated -y \
7
+ gnupg \
8
+ ca-certificates \
9
+ wget \
10
+ locales \
11
+ && localedef -i en_US -f UTF-8 en_US.UTF-8 \
12
+ # Add the current key for package downloading
13
+ # Please refer to QGIS install documentation (https://www.qgis.org/fr/site/forusers/alldownloads.html#debian-ubuntu)
14
+ && mkdir -m755 -p /etc/apt/keyrings \
15
+ && wget -O /etc/apt/keyrings/qgis-archive-keyring.gpg https://download.qgis.org/downloads/qgis-archive-keyring.gpg \
16
+ # Add repository for latest version of qgis-server
17
+ # Please refer to QGIS repositories documentation if you want other version (https://qgis.org/en/site/forusers/alldownloads.html#repositories)
18
+ && echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/debian bullseye main" | tee /etc/apt/sources.list.d/qgis.list \
19
+ && apt-get update \
20
+ && apt-get install --no-install-recommends --no-install-suggests --allow-unauthenticated -y \
21
+ qgis-server \
22
+ spawn-fcgi \
23
+ xauth \
24
+ xvfb \
25
+ && apt-get remove --purge -y \
26
+ gnupg \
27
+ wget \
28
+ && rm -rf /var/lib/apt/lists/*
29
+
30
+ RUN useradd -m qgis
31
+
32
+ ENV TINI_VERSION v0.19.0
33
+ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
34
+ RUN chmod +x /tini
35
+
36
+ ENV QGIS_PREFIX_PATH /usr
37
+ ENV QGIS_SERVER_LOG_STDERR 1
38
+ ENV QGIS_SERVER_LOG_LEVEL 2
39
+
40
+ COPY cmd.sh /home/qgis/cmd.sh
41
+ RUN chmod -R 777 /home/qgis/cmd.sh
42
+ RUN chown qgis:qgis /home/qgis/cmd.sh
43
+
44
+ USER qgis
45
+ WORKDIR /home/qgis
46
+
47
+ ENTRYPOINT ["/tini", "--"]
48
+
49
+ CMD ["/home/qgis/cmd.sh"]