download invoiceninja.tar.gz

This commit is contained in:
Benjamin Brummer
2025-01-13 13:09:33 +00:00
parent d60bf39950
commit 029bc57fac

32
debian/Dockerfile vendored
View File

@@ -16,15 +16,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xfonts-wqy \ xfonts-wqy \
# Install google-chrome-stable(amd64)/chromium(arm64) # Install google-chrome-stable(amd64)/chromium(arm64)
&& if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \
mkdir -p /etc/apt/keyrings \ mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | \ && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | \
gpg --dearmor -o /etc/apt/keyrings/google.gpg \ gpg --dearmor -o /etc/apt/keyrings/google.gpg \
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/google.gpg] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends google-chrome-stable; \ && apt-get install -y --no-install-recommends google-chrome-stable; \
elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \ elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \
apt-get install -y --no-install-recommends \ apt-get install -y --no-install-recommends \
chromium; \ chromium; \
fi \ fi \
# Create config directory for chromium/google-chrome-stable # Create config directory for chromium/google-chrome-stable
&& mkdir /var/www/.config \ && mkdir /var/www/.config \
@@ -37,10 +37,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Install PHP extensions # Install PHP extensions
RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \ RUN ( curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1' ) | sh -s \
${php_require} \ ${php_require} \
${php_suggest} \ ${php_suggest} \
${php_extra} \ ${php_extra} \
@composer @composer
# Configure PHP # Configure PHP
RUN ln -s "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" RUN ln -s "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
@@ -58,10 +58,10 @@ WORKDIR /var/www/html
# Setup InvoiceNinja # Setup InvoiceNinja
RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \ grep -o '"browser_download_url": "[^"]*invoiceninja.tar.gz"' | \
cut -d '"' -f 4 | \ cut -d '"' -f 4 | \
xargs curl -sL | \ xargs curl -sL | \
tar -oxz -C /var/www/html \ tar -xz --strip-components=1 -C /var/www/html \
&& cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ && cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \
# File permissions # File permissions
&& find /var/www/html/ -type f -exec chmod 644 {} \; \ && find /var/www/html/ -type f -exec chmod 644 {} \; \