mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
71
debian/Dockerfile
vendored
71
debian/Dockerfile
vendored
@@ -3,17 +3,16 @@ ARG saxon=12.5.0
|
|||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
git \
|
|
||||||
curl \
|
curl \
|
||||||
libpng-dev \
|
|
||||||
libonig-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
zip \
|
|
||||||
unzip \
|
|
||||||
gosu \
|
|
||||||
default-mysql-client \
|
default-mysql-client \
|
||||||
supervisor \
|
|
||||||
fonts-liberation \
|
fonts-liberation \
|
||||||
|
fonts-noto-cjk \
|
||||||
|
fonts-noto-cjk-extra \
|
||||||
|
fonts-wqy-microhei \
|
||||||
|
fonts-wqy-zenhei \
|
||||||
|
git \
|
||||||
|
gnupg2 \
|
||||||
|
gosu \
|
||||||
libasound2 \
|
libasound2 \
|
||||||
libatk-bridge2.0-0 \
|
libatk-bridge2.0-0 \
|
||||||
libatk1.0-0 \
|
libatk1.0-0 \
|
||||||
@@ -25,20 +24,21 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libgtk-3-0 \
|
libgtk-3-0 \
|
||||||
libnspr4 \
|
libnspr4 \
|
||||||
libnss3 \
|
libnss3 \
|
||||||
|
libonig-dev \
|
||||||
|
libpng-dev \
|
||||||
libwayland-client0 \
|
libwayland-client0 \
|
||||||
libxcomposite1 \
|
libxcomposite1 \
|
||||||
libxdamage1 \
|
libxdamage1 \
|
||||||
libxfixes3 \
|
libxfixes3 \
|
||||||
libxkbcommon0 \
|
libxkbcommon0 \
|
||||||
|
libxml2-dev \
|
||||||
libxrandr2 \
|
libxrandr2 \
|
||||||
xdg-utils \
|
supervisor \
|
||||||
fonts-noto-cjk \
|
unzip \
|
||||||
fonts-noto-cjk-extra \
|
|
||||||
fonts-wqy-microhei \
|
|
||||||
fonts-wqy-zenhei \
|
|
||||||
xfonts-wqy \
|
|
||||||
wget \
|
wget \
|
||||||
gnupg2 \
|
xdg-utils \
|
||||||
|
xfonts-wqy \
|
||||||
|
zip \
|
||||||
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
||||||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||||
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
|
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
|
||||||
@@ -66,45 +66,49 @@ RUN mkdir -p /tmp/chrome \
|
|||||||
chown -R www-data:www-data /tmp/chrome \
|
chown -R www-data:www-data /tmp/chrome \
|
||||||
&& chmod -R 755 /tmp/chrome; \
|
&& chmod -R 755 /tmp/chrome; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy Install PHP extensions installer
|
# Copy Install PHP extensions installer
|
||||||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
#COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
||||||
|
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
|
||||||
|
|
||||||
# Install Required PHP extensions.
|
# Install Required PHP extensions.
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
pdo_mysql \
|
|
||||||
mysqli \
|
|
||||||
mbstring \
|
|
||||||
exif \
|
|
||||||
pcntl \
|
|
||||||
bcmath \
|
bcmath \
|
||||||
|
# curl \ Already installed
|
||||||
|
exif \
|
||||||
gd \
|
gd \
|
||||||
opcache \
|
|
||||||
redis \
|
|
||||||
soap \
|
|
||||||
imagick \
|
|
||||||
curl \
|
|
||||||
gmp \
|
gmp \
|
||||||
|
imagick \
|
||||||
|
# mbstring \ Already installed
|
||||||
|
mysqli \
|
||||||
|
opcache \
|
||||||
|
pcntl \
|
||||||
|
pdo_mysql \
|
||||||
|
redis \
|
||||||
|
# saxon \ outdated
|
||||||
|
soap \
|
||||||
zip \
|
zip \
|
||||||
@composer
|
@composer
|
||||||
|
|
||||||
# Configure PHP
|
# Configure PHP
|
||||||
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
COPY php/php.ini /usr/local/etc/php/conf.d/app.ini
|
COPY php/php.ini /usr/local/etc/php/conf.d/app.ini
|
||||||
COPY php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf
|
COPY php/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf
|
||||||
|
|
||||||
# Configure Saxon
|
# Configure Saxon
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
RUN if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
|
||||||
curl https://downloads.saxonica.com/SaxonC/HE/12/libsaxon-HEC-linux-x86_64-v${saxon}.zip --output saxon.zip \
|
curl https://downloads.saxonica.com/SaxonC/HE/12/libsaxon-HEC-linux-x86_64-v${saxon}.zip --output saxon.zip \
|
||||||
&& unzip saxon.zip -d saxon \
|
&& unzip saxon.zip -d saxon \
|
||||||
&& cp saxon/libsaxon-HEC-linux-amd64-v${saxon}/libs/nix/libsaxon-hec-${saxon}.so /usr/lib/ \
|
&& rm saxon.zip \
|
||||||
|
&& mv saxon/libsaxon-HEC-linux-amd64-v${saxon}/libs/nix/libsaxon-hec-${saxon}.so /usr/lib/ \
|
||||||
&& cd /opt/saxon/libsaxon-HEC-linux-amd64-v${saxon}/Saxon.C.API \
|
&& cd /opt/saxon/libsaxon-HEC-linux-amd64-v${saxon}/Saxon.C.API \
|
||||||
&& phpize \
|
&& phpize \
|
||||||
&& ./configure --enable-saxon \
|
&& ./configure --enable-saxon \
|
||||||
&& make \
|
&& make \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& echo 'extension=saxon.so' > "/usr/local/etc/php/conf.d/app.ini"; \
|
&& rm -rf /opt/saxon \
|
||||||
|
&& echo 'extension=saxon.so' > "$PHP_INI_DIR/conf.d/saxon.ini"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy scripts
|
# Copy scripts
|
||||||
@@ -139,10 +143,7 @@ USER root
|
|||||||
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
# Add initialization script
|
# Add initialization script
|
||||||
COPY scripts/init.sh /usr/local/bin/init.sh
|
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
||||||
|
|
||||||
# Make executable
|
|
||||||
RUN chmod +x /usr/local/bin/init.sh
|
|
||||||
|
|
||||||
# Configure PHP-FPM
|
# Configure PHP-FPM
|
||||||
RUN sed -i "s/user = www-data/user = www-data/g" /usr/local/etc/php-fpm.d/www.conf \
|
RUN sed -i "s/user = www-data/user = www-data/g" /usr/local/etc/php-fpm.d/www.conf \
|
||||||
@@ -182,4 +183,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/init.sh"]
|
ENTRYPOINT ["/usr/local/bin/init.sh"]
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||||
|
|||||||
25
debian/docker-compose.yml
vendored
25
debian/docker-compose.yml
vendored
@@ -1,5 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
x-logging: &default-logging
|
x-logging: &default-logging
|
||||||
options:
|
options:
|
||||||
max-size: "10m"
|
max-size: "10m"
|
||||||
@@ -13,13 +11,11 @@ services:
|
|||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
volumes:
|
volumes:
|
||||||
- ./.env:/var/www/html/.env
|
- ./.env:/var/www/html/.env
|
||||||
- ./php/php.ini:/usr/local/etc/php/php.ini
|
|
||||||
- ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
- ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
|
||||||
- app_storage:/var/www/html/storage
|
- app_storage:/var/www/html/storage
|
||||||
- app_cache:/var/www/html/bootstrap/cache
|
- app_cache:/var/www/html/bootstrap/cache
|
||||||
- image-public:/var/www/html/public:ro
|
- image_public:/var/www/html/public:ro
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -41,8 +37,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
- image-public:/var/www/html/public:ro
|
- app_storage:/var/www/html/storage:ro
|
||||||
|
- image_public:/var/www/html/public:ro
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -68,7 +64,16 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u${MYSQL_USER}", "-p${MYSQL_PASSWORD}"]
|
test:
|
||||||
|
[
|
||||||
|
"CMD",
|
||||||
|
"mysqladmin",
|
||||||
|
"ping",
|
||||||
|
"-h",
|
||||||
|
"localhost",
|
||||||
|
"-u${MYSQL_USER}",
|
||||||
|
"-p${MYSQL_PASSWORD}",
|
||||||
|
]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -109,5 +114,5 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
redis_data:
|
redis_data:
|
||||||
driver: local
|
driver: local
|
||||||
image-public:
|
image_public:
|
||||||
driver: local
|
driver: local
|
||||||
|
|||||||
Reference in New Issue
Block a user