From 71909c73e00018b205d35133220e67949cd4f57c Mon Sep 17 00:00:00 2001 From: Benjamin Brummer Date: Sun, 1 Dec 2024 13:46:58 +0100 Subject: [PATCH] configure chrome during installation --- debian/Dockerfile | 24 +++++++++---------- .../docker-entrypoint-init.d/10-init-in.sh | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index b189172..990b88d 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -21,10 +21,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ xfonts-wqy \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then \ mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/keyrings/google.gpg \ + && curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | \ + 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 \ && apt-get update \ - && apt-get install -y --no-install-recommends google-chrome-stable; \ + && apt-get install -y --no-install-recommends google-chrome-stable \ + && mkdir -p /var/www/.config/google-chrome \ + && chown -R www-data:www-data /var/www/.config/google-chrome; \ elif [ "$(dpkg --print-architecture)" = "arm64" ]; then \ apt-get install -y --no-install-recommends \ # Packages for chrome @@ -46,18 +49,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libxfixes3 \ libxkbcommon0 \ libxrandr2 \ - xdg-utils; \ + xdg-utils \ + && mkdir -p /var/www/.chrome/chrome-profile \ + && chown -R www-data:www-data /var/www/.chrome/chrome-profile; \ fi \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# # Configure chrome -RUN chown www-data:www-data /var/www \ - && if [ "$(dpkg --print-architecture)" = "arm64" ]; then \ - mkdir -p /var/www/.chrome/chrome-profile \ - && chmod -R 755 /var/www/.chrome; \ - fi - # Install Required 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 \ bcmath \ @@ -87,8 +85,10 @@ WORKDIR /var/www/html # Setup InvoiceNinja RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \ - grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | cut -d '"' -f 4 | \ - xargs curl -L | tar -oxvz -C /var/www/html \ + grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \ + cut -d '"' -f 4 | \ + xargs curl -L | \ + tar -oxvz -C /var/www/html \ && cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html \ # File permissions && find /var/www/html/ -type f -exec chmod 644 {} \; \ diff --git a/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh b/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh index b744011..6c03b9d 100644 --- a/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh +++ b/debian/rootfs/docker-entrypoint-init.d/10-init-in.sh @@ -11,4 +11,4 @@ if [ ! -z "${IN_PASSWORD}" ]; then password="--password ${IN_PASSWORD}" fi -php artisan ninja:create-account $email $password \ No newline at end of file +php artisan ninja:create-account $email $password