NoahCardoza / CloudProxy

Proxy server to bypass Cloudflare protection.
MIT License
525 stars 66 forks source link

Raspberry Pi - exec user process caused #66

Closed Northernside closed 1 year ago

Northernside commented 2 years ago

Describe the bug docker-compose up -d isn't working. It fails at step 4/15.

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen. I expected it to start successfully.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Additional context Error log:

Building cloudproxy
Step 1/15 : FROM --platform=${TARGETPLATFORM:-linux/amd64} node:15.2.1-alpine3.11
 ---> 7ddc154413f5
Step 2/15 : ARG TARGETPLATFORM
 ---> Using cache
 ---> 5a09e0dc10a1
Step 3/15 : ARG BUILDPLATFORM
 ---> Using cache
 ---> ec19d88eb66d
Step 4/15 : RUN printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n"
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in c483a3a6978b
standard_init_linux.go:219: exec user process caused: exec format error
ERROR: Service 'cloudproxy' failed to build: The command '/bin/sh -c printf "I am running on ${BUILDPLATFORM:-linux/amd64}, building for ${TARGETPLATFORM:-linux/amd64}\n$(uname -a)\n"' returned a non-zero code: 1
thebetauser commented 2 years ago

This is not technically a bug, the docker file assumes amd64 architecture instead of pulling it from the host OS.

For raspberry pi you need to replace amd64 with arm64v8 which I think is for model 4 If those don't work, the other supported images are arm32v6 arm32v7 for the 32bit versions

NoahCardoza commented 2 years ago

I haven't been around much lately and I'm not even 100% sure this project even works still LOL! If this is an easy fix feel free to submit a PR or point me to a guide @thebetauser. Summer starts next week and I'd like to clean up some of these projects and straighten out the READMEs.

thebetauser commented 2 years ago

@NoahCardoza I did some testing on my pi 4. The issue is targetplatform and buildplatform. These are not needed for running containers. I was able to get it to run and pull the aarch64 version of alpine by removing the targetplatform and buildplatform.

I created PR #69 with the changes

NoahCardoza commented 2 years ago

@Northernside I just merged a PR from @thebetauser (thanks!). If you get a chance give it a go and let me know if it fixes your issues.

NoahCardoza commented 1 year ago

Closing this since there hasn't been a response.

Northernside commented 1 year ago

Ohhh, I'm really sorry! I forgot to answer and then I forgot it for months :/ I actually don't need to use CloudProxy anymore, but I'll try the fix in a few hours! Thank you for your help :)

NoahCardoza commented 1 year ago

@Northernside No worries. I too forgot for a while but apparently I'd set a reminder to check back LOL!