forked from sameersbn/docker-akaunting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (66 loc) · 1.79 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM php:7.3-fpm-alpine3.10
LABEL maintainer="[email protected]"
# Add Production Dependencies
RUN apk add --update --no-cache \
bash \
bzip2-dev \
freetype-dev \
gettext \
icu-dev \
jpegoptim \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
libzip \
libzip-dev \
mysql-client \
nano \
optipng \
php7-mysqli \
php7-pdo_mysql \
php7-gd \
php7-zip \
php7-xml \
php7-mbstring \
pngquant \
sudo \
unzip \
wget \
zlib-dev
# Configure & Install Extension
RUN docker-php-ext-configure \
opcache --enable-opcache &&\
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &&\
docker-php-ext-install \
opcache \
mysqli \
pdo \
pdo_mysql \
sockets \
json \
intl \
gd \
xml \
zip \
bz2 \
pcntl \
bcmath
# Add Composer
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV PATH="./vendor/bin:$PATH"
ENV AKAUNTING_VERSION=1.3.17 \
AKAUNTING_USER=www-data \
AKAUNTING_INSTALL_DIR=/var/www/akaunting \
AKAUNTING_DATA_DIR=/var/local/akaunting \
AKAUNTING_RUNTIME_DIR=/usr/local/akaunting \
AKAUNTING_BUILD_DIR=/tmp
VOLUME [ "/sock" "${AKAUNTING_INSTALL_DIR}" "${AKAUNTING_DATA_DIR}" ]
WORKDIR ${AKAUNTING_INSTALL_DIR}
COPY assets/runtime/ ${AKAUNTING_RUNTIME_DIR}/
COPY assets/tools/ /usr/local/bin/
RUN sed -i 's,^listen = .*,listen = /sock/docker.sock,' /usr/local/etc/php-fpm.d/zz-docker.conf \
&& sed -i 's/^;listen.group = .*/listen.group = www-data/' /usr/local/etc/php-fpm.d/www.conf \
&& sed -i 's/^;env\[PATH\]/env\[PATH\]/' /usr/local/etc/php-fpm.d/www.conf
ENTRYPOINT ["docker-entrypoint"]
CMD ["app:akaunting"]