Akaunting/Dockerfile

58 lines
1.3 KiB
Docker
Raw Permalink Normal View History

2022-06-01 07:42:01 +00:00
FROM php:8.1-apache
ARG AKAUNTING_DOCKERFILE_VERSION=0.1
ARG SUPPORTED_LOCALES="en_US.UTF-8"
RUN apt-get update \
&& apt-get -y upgrade --no-install-recommends \
&& apt-get install -y \
build-essential \
imagemagick \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libjpeg-dev \
libmcrypt-dev \
libonig-dev \
libpng-dev \
libpq-dev \
libssl-dev \
libxml2-dev \
libxrender1 \
libzip-dev \
locales \
openssl \
unzip \
zip \
zlib1g-dev \
--no-install-recommends \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN for locale in ${SUPPORTED_LOCALES}; do \
sed -i 's/^# '"${locale}/${locale}/" /etc/locale.gen; done \
&& locale-gen
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
&& docker-php-ext-install -j$(nproc) \
gd \
bcmath \
intl \
mbstring \
pcntl \
pdo \
pdo_mysql \
zip
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.sh /usr/local/bin/akaunting.sh
COPY files/html /var/www/html
ENTRYPOINT ["/usr/local/bin/akaunting.sh"]
CMD ["--start"]