-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (46 loc) · 1.39 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
FROM php:7.4-apache
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libzip-dev \
imagemagick \
libmcrypt-dev \
libpng-dev \
libpq-dev \
libxrender1 \
locales \
openssh-client \
patch \
unzip \
zlib1g-dev \
zip \
wget \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
COPY ./conf.d/locale.gen /etc/
RUN locale-gen
RUN docker-php-ext-install \
gd \
bcmath \
pcntl \
pdo \
pdo_pgsql \
pdo_mysql \
zip
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis \
&& echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini
RUN a2enmod rewrite
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& rm /etc/apache2/sites-enabled/000-default.conf
COPY ./conf.d/php.ini /usr/local/etc/php/conf.d/akaunting.ini
COPY ./conf.d/akaunting.conf /etc/apache2/sites-enabled/akaunting.conf
COPY ./conf.d/docker-php-entrypoint /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-php-entrypoint
RUN wget -O akaunting.zip "https://akaunting.com/download.php?version=latest&utm_source=docker&utm_campaign=developers" \
&& mkdir -p /var/www/html \
&& unzip akaunting.zip -d /var/www/html \
&& rm akaunting.zip
RUN chown -R 33:33 /var/www/html