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

Raspberry Pi Docker #80

Open
alexgee89 opened this issue Apr 17, 2021 · 14 comments
Open

Raspberry Pi Docker #80

alexgee89 opened this issue Apr 17, 2021 · 14 comments

Comments

@alexgee89
Copy link

I#m running a Raspberry Pi for storing passwords, generating let's encrypt certificates, wallabag and stuff like that i nedd dayly. Now im searching for an easy but powefull snippet manager. Snibox is the thing i like, but its not running on rapi.... has someone a docker container built?

Alex

@MohamedElashri
Copy link

MohamedElashri commented Jul 27, 2021

Hi

I am using snibox on an ARM vps so I have built it for ARM64 architecture. You should find it on docker hub as 'melashri/snibox'. Also I am using sqlite database instead of postgresql the official image is using which makes it a lighter in terms of RAM usage (which really suitable for PI).

To run it you can use the following command and change the port of volume binding location to your specific values if you want

volume)

docker run -d --name snibox \
              --volume /home/snibox/app/db:/app/db/database \
              --publish 4500:3000 \
              --restart always \
              melashri/snibox

@alexgee89
Copy link
Author

alexgee89 commented Jul 27, 2021

Hi Mohamed,
thanks for your reply.
I've tested the docker container, but it just starts and then crashes somehow..... Don't know what happening and where

Tested several Ports and so on....
Can't figuere out whats the problem....
Did you test it on an raspberry pi? or just on an arm Server?
I would like to run in, cause it looks realy usefull.
But thanks for your labor

@MohamedElashri
Copy link

MohamedElashri commented Jul 27, 2021

Hi

I tried it on my ARM64 server which I assume PI 4 architecture is. If you are using PI zero it is ARM32 I think.

Also I could help if you can provide the crash log. You can copy the container log and paste it for more information.

Hint: to know which ARM architecture run uname -m in your terminal. If you have arm64 then it's 64bit processor and if you have armv7l, then it's 32bit.

@alexgee89
Copy link
Author

Hi,
it's a Raspberry Pi 4 with aarch64
Thast the thing, I'm not able to see a log, cause it's always rebboting the docker, without any chance to get a log....
Any ideas, how to get the log?

Thanks for your help ;)

@MohamedElashri
Copy link

MohamedElashri commented Jul 27, 2021

I suspect that you are not using ARM64 image although it should be pulled automatically. Anyway you can specify the platform using docker pull --platform=linux/arm64 instead of just docker pull. Try this and recreate everything from scratch.

Also what is the restarting policy of the container?

@alexgee89
Copy link
Author

Will try that in a few minutes.
The restarting policy is "always" like in your documentation.
Thank you very much since now ;)

@alexgee89
Copy link
Author

Got still the same issue..... now, sometimes the docker says: " Stopped for a minute with exit code 159" but with no further description in logs....

@MohamedElashri
Copy link

MohamedElashri commented Jul 27, 2021

I am not sure what is the problem but lets try some debugging. If you run docker version what is the value of OS/Arch? Is it ARM64?

I think one nuclear solution would be if you build the image locally. Just clone this repository ( or one in my profile if you want sqlite version) then run
docker build -t snibox . and then use this local image instead of mine.

@alexgee89
Copy link
Author

docker version is:
Client:
Version: 18.09.1
API version: 1.39
Go version: go1.11.6
Git commit: 4c52b90
Built: Fri, 13 Sep 2019 10:45:43 +0100
OS/Arch: linux/arm
Experimental: false

Server:
Engine:
Version: 18.09.1
API version: 1.39 (minimum version 1.12)
Go version: go1.11.6
Git commit: 4c52b90
Built: Fri Sep 13 09:45:43 2019
OS/Arch: linux/arm
Experimental: true

But bow it is running ... changed several things:

  • enabled "Privileged mode"
  • changed network to "host"
    But need top call port 3000 instead of the changed port (8888).
    Will test several things and send you the results ;)

@MohamedElashri
Copy link

Good to know it is working. Not sure as I don't have idea yet if everything will work. I just want to refer that even if the kernel is 64 bit your docker installation is 32bit and this is what is causing problem with ARM64 images. You can have docker in userspace as 32bit program in 64bit system but not the opposite. I think if things doesn't work out of the box you should build the image on your PI.

@MohamedElashri
Copy link

I have pushed an ARM32 (arm) build to the docker image if that would help.

@alexgee89
Copy link
Author

Hey Mohamed,
thanks for this! ;) I will try it, when I am back at the PC and will give you feedback.

@alexgee89
Copy link
Author

Hi there
the 32 Version works perfectly out of the box. Thanks for your huge help!
One thing, that doesn't work is: When i call the internal IP with my specified Port, i can login (etc) but when i call my external domain snibox...tld i get the following message:

"The change you wanted was rejected.
Maybe you tried to change something you didn't have access to.
If you are the application owner check the logs for more information."

Is there something wrong in my routing? Other docker container works fine without modification......

@MohamedElashri
Copy link

MohamedElashri commented Jul 29, 2021

Without the logs I can't say much but as a guess this has something to do with your browser privacy settings.

Add web_socket support to your reverse proxy and make sure your settings are correct.

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

No branches or pull requests

2 participants