'Docker Desktop: Attaching JSB WeasyPrint Image?
I'm seeking to use WeasyPrint on AWS Lambda. When I import WeasyPrint into the Lambda with:
from weasyprint import HTML, CSS
...I get the error:
(rapid) Init failed error=Runtime exited with error: exit status 1 InvokeID=
This is a known anomaly for WeasyPrint on Lambda, and JBSSolutions has created a docker image for WeasyPrint, to address it.
Their docs are very detailed about how to get this running on AWS Lambda in the cloud. So now I'm wondering if I can also get this working on my local AWS Lambda development system.
The JBSSolutions package creates a Docker image called weasyprint-layer-python3.8.zip, with an accompanying file called fonts-layer.zip. It also creates Docker.raw in directory DockerDesktop.
I went to Docker Desktop prefs and selected /Users/my_computer/Documents/code/src/github.com/cloud-print-utils/build/DockerDesktop as the disk image location.
But when I run my app with that Docker image selected, I still get the same Init failed error.
Is it possible to debug WeasyPrint running on Lambda on a local dev system?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
