doker updated jor libre install

This commit is contained in:
DigiServer Developer
2025-11-20 19:59:49 +02:00
parent efb63f2b3f
commit 78c83579ee
2 changed files with 3 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ EXPOSE 5000
# Create a non-root user and grant sudo access for dependency installation # Create a non-root user and grant sudo access for dependency installation
RUN useradd -m -u 1000 appuser && \ RUN useradd -m -u 1000 appuser && \
chown -R appuser:appuser /app /docker-entrypoint.sh && \ chown -R appuser:appuser /app /docker-entrypoint.sh && \
echo "Defaults:appuser !requiretty, !use_pty" >> /etc/sudoers && \
echo "appuser ALL=(ALL) NOPASSWD: /usr/bin/apt-get" >> /etc/sudoers && \ echo "appuser ALL=(ALL) NOPASSWD: /usr/bin/apt-get" >> /etc/sudoers && \
echo "appuser ALL=(ALL) NOPASSWD: /app/install_libreoffice.sh" >> /etc/sudoers && \ echo "appuser ALL=(ALL) NOPASSWD: /app/install_libreoffice.sh" >> /etc/sudoers && \
echo "appuser ALL=(ALL) NOPASSWD: /app/install_emoji_fonts.sh" >> /etc/sudoers && \ echo "appuser ALL=(ALL) NOPASSWD: /app/install_emoji_fonts.sh" >> /etc/sudoers && \

View File

@@ -615,7 +615,7 @@ def install_libreoffice():
flash('Installation script not found', 'danger') flash('Installation script not found', 'danger')
return redirect(url_for('admin.dependencies')) return redirect(url_for('admin.dependencies'))
result = subprocess.run(['sudo', 'bash', script_path], result = subprocess.run(['sudo', '-n', script_path],
capture_output=True, capture_output=True,
text=True, text=True,
timeout=300) timeout=300)
@@ -652,7 +652,7 @@ def install_emoji_fonts():
flash('Installation script not found', 'danger') flash('Installation script not found', 'danger')
return redirect(url_for('admin.dependencies')) return redirect(url_for('admin.dependencies'))
result = subprocess.run(['sudo', 'bash', script_path], result = subprocess.run(['sudo', '-n', script_path],
capture_output=True, capture_output=True,
text=True, text=True,
timeout=180) timeout=180)