snibox / snibox

Self-hosted snippet manager

Home Page:https://snibox.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raspberry Pi Docker

alexgee89 opened this issue · comments

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

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

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

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.

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 ;)

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?

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

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....

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.

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 ;)

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.

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

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

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......

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.