Add PDF generation and printing functionality using Google Chrome
This commit is contained in:
+18
@@ -55,6 +55,24 @@ RUN useradd \
|
||||
print \
|
||||
&& sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers
|
||||
|
||||
|
||||
# Print PDF
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
--no-install-recommends \
|
||||
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
|
||||
&& apt-get update && apt-get install -y \
|
||||
google-chrome-stable \
|
||||
--no-install-recommends
|
||||
|
||||
# It won't run from the root user.
|
||||
RUN groupadd chrome && useradd -g chrome -s /bin/bash -G audio,video chrome \
|
||||
&& mkdir -p /home/chrome && chown -R chrome:chrome /home/chrome
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user