[🚀] Running Juice-shop in Raspberry Pi 4
See original GitHub issue🚀 Feature request
Description
In issue #380 , @battletux was kind enough to provide a solution to run Juice-Shop in a Docker container inside of a Raspberry Pi (as shown below) and in the Docker Hub repository at: https://hub.docker.com/r/arclight/juice-shop_arm
Unfortunately, this does not work in newer platforms such as the Raspberry Pi 4. This was the original Dockerfile in issue #380:
# OWASP Juice Shop - An intentionally insecure JavaScript Web Application
FROM arm32v7/node:6
LABEL version = "5.0.0"
COPY . /juice-shop
WORKDIR /juice-shop
RUN npm install --production --unsafe-perm
EXPOSE 3000
CMD ["npm", "start"]
Running this in a Raspberry Pi 4 does not work and generates the following errors:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /juice-shop/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/juice-shop/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-04-17T03_39_11_426Z-debug.log
Solution ideas
I am opening this issue to try to fix it and (if I am successful) I will document the solution here. If I am not successful in the next week or so, I will close this issue and leave it as a documented problem.
Possible alternatives
I also tried the latest arm32v7/node
image and it didn’t work.
FROM arm32v7/node
However, I will try to build the container manually and (again, if successful) I will upload to Docker Hub and document it here.
Running Juice-shop in Raspberry Pi’s allow students with low resources to build a cool lab. I am a super big fan of Juice-shop and run it in numerous environments (cloud, intel nucs with containers, proxmox, etc.).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:26 (16 by maintainers)
Top GitHub Comments
Works like a charm!
The Travis-CI jobs are now caching more efficiently and use
npm prune --production
instead of deleting allnode_modules
resulting in way faster builds even onarm64
. Timeouts do not occur any more.@santosomar, could you maybe check if the
v10.2.1
package still works inside a Docker image on your RasPi? Also, I’ve added a variable in my ebook for the last Juice Shop version you built the Arm-based Docker image for:If you think about automating your image creation somehow, please let me know, then I remove it again. Otherwise I’ll try to remember to regularly check for your current version and update the variable. You can of course also send a PR updating it in https://github.com/bkimminich/pwning-juice-shop/blob/master/book.json and https://github.com/bkimminich/pwning-juice-shop/blob/master/book-ctf.json.