Skip to content

Commit 39d428d

Browse files
authored
Enable execution in Docker environments, again (#23)
1 parent 1707099 commit 39d428d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

html2print/html2print.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from selenium.webdriver.chrome.service import Service
2121
from webdriver_manager.core.os_manager import ChromeType, OperationSystemManager
2222

23-
__version__ = "0.0.13"
23+
__version__ = "0.0.14"
2424

2525
PATH_TO_HTML2PDF_JS = os.path.join(
2626
os.path.dirname(os.path.join(__file__)), "html2pdf_js", "html2pdf.min.js"
@@ -319,8 +319,11 @@ def create_webdriver(
319319
webdriver_options = Options()
320320
webdriver_options.add_argument("start-maximized")
321321
webdriver_options.add_argument("disable-infobars")
322-
webdriver_options.add_argument("--headless")
323322
webdriver_options.add_argument("--disable-extensions")
323+
webdriver_options.add_argument("--headless")
324+
# FIXME: This is not nice but otherwise it does not work in Ubuntu 24-based Docker image.
325+
# https://github.com/SeleniumHQ/selenium/issues/15327#issuecomment-2689287561
326+
webdriver_options.add_argument("--no-sandbox")
324327

325328
# The Chrome option --disable-dev-shm-usage disables the use of /dev/shm
326329
# (shared memory) for temporary storage in Chrome.

0 commit comments

Comments
 (0)