-
Notifications
You must be signed in to change notification settings - Fork 88
/
fpm-alpine-nginx.Dockerfile
42 lines (32 loc) · 1.34 KB
/
fpm-alpine-nginx.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
FROM php:7.4-fpm-alpine3.12
# Arguments defined in docker-compose.yml
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
ARG SUPPORTED_LOCALES="en_US.UTF-8"
# Add Repositories
RUN rm -f /etc/apk/repositories &&\
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories
# Add Dependencies
RUN apk add --update --no-cache \
nano \
bash \
nginx
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Install PHP Extensions
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions gd zip intl imap xsl pgsql opcache bcmath mysqli pdo_mysql
# Configure Extension
RUN docker-php-ext-configure \
opcache --enable-opcache
# Download Akaunting application
RUN mkdir -p /var/www/akaunting \
&& curl -Lo /tmp/akaunting.zip 'https://akaunting.com/download.php?version=latest&utm_source=docker&utm_campaign=developers' \
&& unzip /tmp/akaunting.zip -d /var/www/html \
&& rm -f /tmp/akaunting.zip
COPY files/akaunting-php-fpm-nginx.sh /usr/local/bin/akaunting-php-fpm-nginx.sh
COPY files/html /var/www/html
# Setup Working Dir
WORKDIR /var/www/html
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/akaunting-php-fpm-nginx.sh"]
CMD ["--start"]