whoogle-search icon indicating copy to clipboard operation
whoogle-search copied to clipboard

[BUG] Unraid docker unable to install/use

Open cammelspit opened this issue 3 years ago • 4 comments

Describe the bug Permission denied errors are thrown and container stops.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Install docker image from community apps'
  2. Open 'Logs'

Deploymentoyment Method

  • [ ] Heroku (one-click deploy)
  • [X] Docker
  • [ ] run executable
  • [ ] pip/pipx
  • [ ] Other: [describe setup]

Version of Whoogle Search

  • [X] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc)
  • [ ] Version [version number]
  • [ ] Not sure

Desktop (please complete the following information):

  • OS: [Unraid 1.10.2 RC2]
  • Browser [All but mostly Brave]

Additional context Whoogle stopped working a couple months ago and I stopped using it so I could wait for a fix. Seems there is no fix as it is still broken. I have wiped out the relevant folders and started fresh and the same issue persists. Any assistance will be greatly appreciated! I LOOOOOVE Whoogle and what it does and not having it since maybe November has made me a sad panda. :)

Here is the log output. image

cammelspit avatar Feb 19 '22 21:02 cammelspit

I'm not sure how Unraid apps work, but the last major change to the Dockerfile (adding a whoogle user with uid 927, at the end of January) might have caused the error in your screenshot. Can you show the owner/permissions for the /config dir and verify if the user whoogle is found in your container?

benbusby avatar Feb 21 '22 16:02 benbusby

I can also confirm that this is happening on Docker on Open Media Vault. Same error occurs and the ownership of the Whoogle config folder is root. It seems no user named whoogle is created?

shulist avatar Jun 06 '22 20:06 shulist

sudo chown 927:927 <path mapping to /config> in an unRAID shell resolves the issue. Pretty sure this is an unRAID issue and not a whoogle-search issue.

927:927 is based on the UID / GID written in the docker-compose.

cazwacki avatar Dec 29 '22 19:12 cazwacki

unRAID expects user 'nobody' (UID 99), group 'users' (GID 100). You can chown the files to 927:927 but you'll run into problems accessing them outside of the container, and while there are tools to clean up appdata permissions, it'd be better to have the ability to select a user and group for the execution.

Specifically, integrate the --user flag or alternate environment variables to allow an alternate user/group/umask to be used.

Set environment variables:

PUID=$(id -u)
PGID=$(id -g)
...
docker-compose up

docker-compose.yaml:

version: "2.4"

services:
  whoogle-search:
    image: ${WHOOGLE_IMAGE:-benbusby/whoogle-search}
    container_name: whoogle-search
    restart: unless-stopped
    pids_limit: 50
    mem_limit: 256mb
    memswap_limit: 256mb
    user: ${PUID}
    security_opt:
      - no-new-privileges
    cap_drop:
      - ALL
    tmpfs:
      - /config/:size=10M,uid=${PUID},gid=${PGID},mode=1700
      - /var/lib/tor/:size=15M,uid=${PUID},gid=${PGID},mode=1700
      - /run/tor/:size=1M,uid={PUID}.gid=${PGID},mode=1700
    ports:
      - 5000:5000

That'll pick up the --user 99:100 that can be used in Extra Parameters in unRAID's docker management.

talonius avatar Jan 23 '23 06:01 talonius