question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes inside Alpine docker

See original GitHub issue

Node.js Version: 10.15.0 hummus-recipe: V1.9.2

Hi,

I am trying to add image to an existing PDF using .image . It works working on my local machine (Ubuntu 16.04), however it crashes inside the Alpine container on calling endPDF(thus creating a corrupted PDF).

Tried downgrading to v1.7.4, didn’t help.

Any help is appreciated.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AyushG3112commented, Feb 19, 2020

@chunyenHuang Thanks that works!

For posterity, we had to add the following things to our Dockerfile:

RUN apk add  g++ gcc libgcc libstdc++ linux-headers make python
RUN npm install -g node-gyp 
RUN npm install
RUN npm rebuild hummus --build-from-source
1reaction
hdiaz-nectiacommented, Nov 23, 2020

Hi @chunyenHuang @AyushG3112 I’ve a similar problem, and the above solution doesn’t work for me.

Dockerfile node:12.19-alpine

console.log('New');
const pdfDoc = new HummusRecipe(filenameSrc, filenameEnc);
console.log('Encrypt');

pdfDoc
    .encrypt({
        userPassword: key,
        ownerPassword: key,
        userProtectionFlag: 4
    })
    .endPDF();

console.log('End');

The last step executed is log Encrypt an then simply it exit from docker run. Last log never is printed (and any other error) and when I go inside container with docker exec i saw that the destination file has 0 size.

My mistake, the correct is:

RUN npm rebuild muhammara --build-from-source

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java SDK crashes the JVM on Alpine docker image
We are using the Docker image eclipse-temurin:17-alpine in a Spring boot application. When running Java SDK version 3.0.10 the application ...
Read more >
OS crashes while running as a docker container inside ...
The Spring Boot application crashes on startup with the error below. The only fix is to switch to docker.io/redhat/ubi8:latest.
Read more >
Why does my python:3.8-alpine based application crash on a ...
The problem was that I was using docker-compose that just launches the container using an obsolete image, the solution is to mount the ......
Read more >
alpine container crashing with this error in CMD : r/docker
alpine container crashing with this error in CMD. I am getting error: $ docker logs fb7c628beef7 /bin/sh: [/usr/sbin/crond,: not found.
Read more >
Running SSH in an Alpine Docker Container
Service is crashed because Alpine Docker images allow only a single process to be launched. It is actually a good concept that facilitates ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found