Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails in docker Container #59

Open
impguard opened this issue Oct 6, 2015 · 3 comments
Open

Fails in docker Container #59

impguard opened this issue Oct 6, 2015 · 3 comments

Comments

@impguard
Copy link

impguard commented Oct 6, 2015

Referencing #57.

This still seems to have a problem inside a Docker container. I'm running a debian docker container with the polymer starter kit which uses the gulp-imagemin plugin. This seems to fail with this output:

Unhandled rejection Error: Command failed: /opt/rift/node_modules/gulp-
imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-
bin/vendor/optipng -strip all -clobber -force -fix -o 2 -out /tmp/06bbcf19-f1ad-454f-bd52-
7acad3cd4a94 /tmp/4b6a19b5-9f49-47ec-a120-aee0634017dd
/opt/rift/node_modules/gulp-imagemin/node_modules/imagemin/node_modules/imagemin-
optipng/node_modules/optipng-bin/vendor/optipng: 6: /opt/rift/node_modules/gulp-
imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-
bin/vendor/optipng: Syntax error: newline unexpected

The various solutions pointed out in #57 seems to not fix the problem.

@vvu
Copy link

vvu commented Nov 6, 2015

I had the same issue occur. Turns out it was because I had installed the gulp-imagemin module on my host machine in a folder I was sharing with the container. I ended up deleting the node_modules folder on my host machine and installing the modules inside the docker container instead, which fixed the error.

@fabiomontefuscolo
Copy link

I got this message after enabling verbose log in npm. I don't if I should try to solve this on my dockers or if is a good idea inspect what happens when we try to spawn a curl process.

npm info lifecycle optipng-bin@3.0.3~postinstall: optipng-bin@3.0.3

> optipng-bin@3.0.3 postinstall /home/helllab/repository/myproject-dev/node_modules/optipng-bin
> node lib/install.js


#
# Fatal error in heap setup
# Allocation failed - process out of memory
#

Illegal instruction (core dumped)
npm verb lifecycle optipng-bin@3.0.3~postinstall: unsafe-perm in lifecycle true
npm verb lifecycle optipng-bin@3.0.3~postinstall: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/helllab/repository/myproject-dev/node_modules/optipng-bin/node_modules/.bin:/home/helllab/repository/myproject-dev/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
npm verb lifecycle optipng-bin@3.0.3~postinstall: CWD: /home/helllab/repository/myproject-dev/node_modules/optipng-bin
npm sill lifecycle optipng-bin@3.0.3~postinstall: Args: [ '-c', 'node lib/install.js' ]
npm sill lifecycle optipng-bin@3.0.3~postinstall: Returned: code: 132  signal: null
npm info lifecycle optipng-bin@3.0.3~postinstall: Failed to exec postinstall script
npm verb unlock done using /home/helllab/.npm/_locks/staging-c7f2061a851f975a.lock for /home/helllab/repository/myproject-dev/node_modules/.staging

Well, compile C code inside docker may be a bad idea. I will create a docker image with optipng-bin inside. It shoud solve the problem.

@rxgx
Copy link

rxgx commented Dec 17, 2015

I was copying my project directory to the Docker container and received the same error. I fixed it by ignoring the optipng-bin module in node_modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants