Juice-shop: Fresh juice-shop install from Docker shows no graphics, broken text

Created on 21 Sep 2016  路  14Comments  路  Source: bkimminich/juice-shop

Hi,

I just tweeted with you about this issue (https://twitter.com/braimee/status/778628073725964288) but essentially I've got a fresh 64-bit Ubuntu VM that I wanted to setup to host the Juice Shop app, and I'm having an issue where the app appears kinda broken.

All I did "out of the box" was the ol' apt-get update and apt-get upgrade followed by apt-get install docker.io and docker pull bkimminich/juice-shop followed by docker run -d -p 3000:3000 bkimminich/juice-shop and this is what I'm seeing:

screen shot 2016-09-21 at 11 10 02 am

I tried it on multiple browsers and flushed cache on all of them to make sure.

You'd asked me to check the console for errors but there weren't any - just confirmation that the container started.

Thanks,
Brian

bug continuous integration

All 14 comments

I guess I found it meanwhile. The UI dependencies which are supposed to be installed via bower are not installed at all:

npm WARN cannot run in wd [email protected] bower install && grunt minify (wd=/juice-shop)

Seems that since I removed the helper scripts and replaced them with global bower/grunt-cli installations this never worked.

@braimee Thanks for noticing and reporting this!

Well, that only made things worse... 馃槥

> [email protected] postinstall /juice-shop
> bower install && grunt minify

info postinstall [email protected]
bower ESUDO         Cannot be run with sudo

Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.

http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814

You can however run a command with sudo using --allow-root option

npm info [[email protected] Failed to exec postinstall script
npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--unsafe-perm"
npm ERR! node v4.5.0
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `bower install && grunt minify`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'bower install && grunt minify'.
npm ERR! This is most likely a problem with the juice-shop package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     bower install && grunt minify
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs juice-shop
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls juice-shop
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /juice-shop/npm-debug.log
Removing intermediate container e08f913fc2dd
The command '/bin/sh -c cd /juice-shop; npm install bower -g; npm install grunt-cli -g; npm install --unsafe-perm' returned a non-zero code: 1

Hey sorry for the trouble but thanks for looking into this so quickly! I should've mentioned that I did this on another test VM _last_ week and it worked like a champ, which made me go "Uhh...what did I do wrong this time??? There's not that many commands for me to mess up!" :-)

Yeah, I just removed those scripts yesterday with 9d4d459e868f16f5ee3c85eb76b0706eb3db28aa because they _seemed_ obsolete now that locally and on Travis-CI/AppVeyor everything worked fine. Unfortunately the Docker build didn't crash from these unexecutable commands.

Meanwhile you should be able to work around the issue with an image that is later, e.g. https://hub.docker.com/r/bkimminich/juice-shop/builds/bg9xmbfuftqqcuszaewoss5/

Forgive the newbness, but what is the syntax for pulling that specific build? I can't seem to make it work.

馃巻 It's fixed in latest 馃巻 ! 馃槃

Awesome...testing shortly!

Thanks - will you let me know if I did something wrong here? I tried to grab the latest and it appears to launch fine, but port 3000 isn't listening:

root@juice:~# docker pull bkimminich/juice-shop
Using default tag: latest
latest: Pulling from bkimminich/juice-shop
2f5fbf611374: Already exists
9338b080890f: Already exists
27e9f9640562: Already exists
5dff8d6297fa: Already exists
7126816c0725: Already exists
154a36c4c98b: Already exists
5d2c72d21bad: Already exists
a12885d224a7: Pull complete
e620ba76af61: Pull complete
ab2121fb10c4: Pull complete
a0820d39e63c: Pull complete
70329b03b5ce: Pull complete
Digest: sha256:c631ca8e4ffd0c41eec39e73dd1cd9881664e4488e0c1bac55fbf88e945994fd
Status: Downloaded newer image for bkimminich/juice-shop:latest
root@juice:~# docker run -d -p 3000:3000 bkimminich/juice-shop
981a2ead575225668dd2de4140eaab2ee923a6256fe55301715d7cbac50bd910
root@juice:~# netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1307/sshd
tcp6 0 0 :::22 :::* LISTEN 1307/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 999/dhclient
root@juice:~#
root@juice:~#

If it helps, here's what my syslog says right as I start to fire the container up.
docker-log.txt

This seems more like a host problem. I found this ticket where someone had a similar issue: https://github.com/docker/docker/issues/21390

Anyway, I'll set up an EC2 instance with the latest image and see if that works out of the box.

Hey I just pulled latest and it's working again - thanks much!

Happy hacking! And if you email/DM me your address I make sure some stickers come your way!

I will absolutely take you up on your generous offer shortly, thanks!

This thread has been automatically locked because it has not had recent activity after it was closed. :lock: Please open a new issue for regressions or related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bkimminich picture bkimminich  路  15Comments

bkimminich picture bkimminich  路  42Comments

bkimminich picture bkimminich  路  25Comments

thefishermanhacker picture thefishermanhacker  路  13Comments

bkimminich picture bkimminich  路  13Comments