-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile
61 lines (44 loc) · 1.47 KB
/
Dockerfile
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
58
59
60
61
FROM php:8.3-apache as base-container
ENV APACHE_DOCUMENT_ROOT /var/mapbender/application/public
RUN apt-get update && apt-get install -y \
libpq-dev \
unzip \
openssl \
bzip2 \
sqlite3 \
curl \
libcurl4-gnutls-dev \
libgd-dev \
libicu-dev \
libzip-dev \
libbz2-dev \
libxml2-dev \
libsqlite3-dev \
libldap2-dev \
libonig-dev \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install pdo_pgsql
RUN docker-php-ext-configure gd --with-jpeg --with-freetype
RUN docker-php-ext-install curl gd intl mbstring zip bz2 xml pdo_sqlite ldap
RUN docker-php-ext-install opcache
RUN rm /etc/apache2/sites-enabled/*
COPY ./docker/mapbender_apache.conf /etc/apache2/sites-enabled/
COPY ./docker/php.ini /usr/local/etc/php/php.ini
RUN sed -ri -e 's!80!8080!g' /etc/apache2/ports.conf
RUN a2enmod rewrite remoteip
RUN chown www-data:www-data -R /var/www
WORKDIR /var/mapbender/
EXPOSE 8080
COPY --chown=www-data:www-data . /var/mapbender/
FROM base-container as build-container
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
USER www-data
# required to create a complete mapbender application container image including all dependencies
RUN ./bootstrap
FROM base-container
USER www-data
COPY --from=build-container --chown=www-data:www-data /var/mapbender /var/mapbender
CMD ["apache2-foreground"]