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

Container refuses to honor puid:guid && container blocks us from using hostname:8465 in browser #149

Open
C-Fu opened this issue Nov 23, 2024 · 0 comments

Comments

@C-Fu
Copy link

C-Fu commented Nov 23, 2024

root@dock-fu:~/ownfoil# id
uid=0(root) gid=0(root) groups=0(root)
root@dock-fu:~/ownfoil# id c-fu
uid=1000(c-fu) gid=1000(homelab) groups=1000(homelab)
root@dock-fu:~/ownfoil# cat docker-compose.yml
version: "3"

services:
  ownfoil:
    container_name: ownfoil
    image: a1ex4/ownfoil
    environment:
   #   # For write permission in config directory
      - PUID=1000
      - PGID=1000
    volumes:
      - ./games:/games
      - ./config:/app/config
    ports:
      - "8465:8465"
networks:
  default:
    name: games_net
root@dock-fu:~/ownfoil# dc up -d && dc logs -f #dc is an alias for docker compose
WARN[0000] /root/ownfoil/docker-compose.yml: the attribute `version` is obsolete, it wi                                                                                                                                               ll be ignored, please remove it to avoid potential confusion
[+] Running 2/2
 ✔ Network games_net  Created                                                     0.2s
 ✔ Container ownfoil  Started                                                     0.6s
WARN[0000] /root/ownfoil/docker-compose.yml: the attribute `version` is obsolete, it wi                                                                                                                                               ll be ignored, please remove it to avoid potential confusion
ownfoil  | Starting ownfoil
ownfoil  | [2024-11-23 02:27:29.608] INFO (app) Starting initialization of Ownfoil...
ownfoil  | [2024-11-23 02:27:29.609] INFO (app) Initializing File Watcher...
ownfoil  | [2024-11-23 02:27:29.609] INFO (app) Loading initial configuration...
ownfoil  | [2024-11-23 02:27:29.612] INFO (file_watcher) Adding directory /games to wat                                                                                                                                               chdog.
ownfoil  | [2024-11-23 02:27:29.613] INFO (titledb) Updating titledb...
ownfoil  | [2024-11-23 02:27:30.413] WARNING (connectionpool) Retrying (Retry(total=2,                                                                                                                                                connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameR                                                                                                                                               esolutionError("<urllib3.connection.HTTPSConnection object at 0x789d76bf09d0>: Failed t                                                                                                                                               o resolve 'productionresultssa10.blob.core.windows.net' ([Errno -3] Try again)")': /act                                                                                                                                               ions-results/2ada46cc-a100-4803-a377-30eb9d6661af/workflow-job-run-ca395085-040a-526b-2                                                                                                                                               ce8-bdc85f692774/artifacts/dd3abbb97c2553ba49b1dfbcf1df6edda8f5170ed6065632f93de2dcdcc2                                                                                                                                               6da4.zip?rscd=attachment%3B+filename%3D%22titledb.zip%22&se=2024-11-23T02%3A37%3A28Z&si                                                                                                                                               g=82FaqcRCRa4UPqaKTEn4kVMpXZVFkMqsdRRUcF%2FEXyc%3D&ske=2024-11-23T11%3A57%3A27Z&skoid=c                                                                                                                                               a7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-11-22T23%3A57%3A27Z&sktid=398a6654-9                                                                                                                                               97b-47e9-b12b-9515b896b4de&skv=2024-11-04&sp=r&spr=https&sr=b&st=2024-11-23T02%3A27%3A2                                                                                                                                               3Z&sv=2024-11-04
ownfoil  | [2024-11-23 02:27:30.422] WARNING (connectionpool) Retrying (Retry(total=1,                                                                                                                                                connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameR                                                                                                                                               esolutionError("<urllib3.connection.HTTPSConnection object at 0x789d76c04c90>: Failed t                                                                                                                                               o resolve 'productionresultssa10.blob.core.windows.net' ([Errno -3] Try again)")': /act                                                                                                                                               ions-results/2ada46cc-a100-4803-a377-30eb9d6661af/workflow-job-run-ca395085-040a-526b-2                                                                                                                                               ce8-bdc85f692774/artifacts/dd3abbb97c2553ba49b1dfbcf1df6edda8f5170ed6065632f93de2dcdcc2                                                                                                                                               6da4.zip?rscd=attachment%3B+filename%3D%22titledb.zip%22&se=2024-11-23T02%3A37%3A28Z&si                                                                                                                                               g=82FaqcRCRa4UPqaKTEn4kVMpXZVFkMqsdRRUcF%2FEXyc%3D&ske=2024-11-23T11%3A57%3A27Z&skoid=c                                                                                                                                               a7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-11-22T23%3A57%3A27Z&sktid=398a6654-9                                                                                                                                               97b-47e9-b12b-9515b896b4de&skv=2024-11-04&sp=r&spr=https&sr=b&st=2024-11-23T02%3A27%3A2                                                                                                                                               3Z&sv=2024-11-04
ownfoil  | [2024-11-23 02:27:30.432] WARNING (connectionpool) Retrying (Retry(total=0,                                                                                                                                                connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameR                                                                                                                                               esolutionError("<urllib3.connection.HTTPSConnection object at 0x789d76c051d0>: Failed t                                                                                                                                               o resolve 'productionresultssa10.blob.core.windows.net' ([Errno -3] Try again)")': /act                                                                                                                                               ions-results/2ada46cc-a100-4803-a377-30eb9d6661af/workflow-job-run-ca395085-040a-526b-2                                                                                                                                               ce8-bdc85f692774/artifacts/dd3abbb97c2553ba49b1dfbcf1df6edda8f5170ed6065632f93de2dcdcc2                                                                                                                                               6da4.zip?rscd=attachment%3B+filename%3D%22titledb.zip%22&se=2024-11-23T02%3A37%3A28Z&si                                                                                                                                               g=82FaqcRCRa4UPqaKTEn4kVMpXZVFkMqsdRRUcF%2FEXyc%3D&ske=2024-11-23T11%3A57%3A27Z&skoid=c                                                                                                                                               a7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2024-11-22T23%3A57%3A27Z&sktid=398a6654-9                                                                                                                                               97b-47e9-b12b-9515b896b4de&skv=2024-11-04&sp=r&spr=https&sr=b&st=2024-11-23T02%3A27%3A2                                                                                                                                               3Z&sv=2024-11-04
ownfoil  | Traceback (most recent call last):
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line                                                                                                                                                199, in _new_conn
ownfoil  |     sock = connection.create_connection(
ownfoil  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py",                                                                                                                                                line 60, in create_connection
ownfoil  |     for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
ownfoil  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
ownfoil  |     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
ownfoil  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  | socket.gaierror: [Errno -3] Try again
ownfoil  |
ownfoil  | The above exception was the direct cause of the following exception:
ownfoil  |
ownfoil  | Traceback (most recent call last):
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 789, in urlopen
ownfoil  |     response = self._make_request(
ownfoil  |                ^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 490, in _make_request
ownfoil  |     raise new_e
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 466, in _make_request
ownfoil  |     self._validate_conn(conn)
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 1095, in _validate_conn
ownfoil  |     conn.connect()
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line                                                                                                                                                693, in connect
ownfoil  |     self.sock = sock = self._new_conn()
ownfoil  |                        ^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line                                                                                                                                                206, in _new_conn
ownfoil  |     raise NameResolutionError(self.host, self, e) from e
ownfoil  | urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection                                                                                                                                                object at 0x789d76c05910>: Failed to resolve 'productionresultssa10.blob.core.windows.n                                                                                                                                               et' ([Errno -3] Try again)
ownfoil  |
ownfoil  | The above exception was the direct cause of the following exception:
ownfoil  |
ownfoil  | Traceback (most recent call last):
ownfoil  |   File "/app/app.py", line 387, in <module>
ownfoil  |     init()
ownfoil  |   File "/app/app.py", line 36, in init
ownfoil  |     titledb.update_titledb(app_settings)
ownfoil  |   File "/app/titledb.py", line 87, in update_titledb
ownfoil  |     update_titledb_files(app_settings)
ownfoil  |   File "/app/titledb.py", line 70, in update_titledb_files
ownfoil  |     if is_titledb_update_available(rzf):
ownfoil  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/app/titledb.py", line 28, in is_titledb_update_available
ownfoil  |     remote_latest_commit_file = [ f.filename for f in rzf.infolist() if 'lat                                                                                                                                               est_' in f.filename ][0]
ownfoil  |                                                       ^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/unzip_http.py", line 147, in                                                                                                                                                infolist
ownfoil  |     return list(self.infoiter())
ownfoil  |            ^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/unzip_http.py", line 153, in                                                                                                                                                infoiter
ownfoil  |     resp = self.http.request('HEAD', self.url)
ownfoil  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/_request_methods.py"                                                                                                                                               , line 135, in request
ownfoil  |     return self.request_encode_url(
ownfoil  |            ^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/_request_methods.py"                                                                                                                                               , line 182, in request_encode_url
ownfoil  |     return self.urlopen(method, url, **extra_kw)
ownfoil  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/poolmanager.py", lin                                                                                                                                               e 443, in urlopen
ownfoil  |     response = conn.urlopen(method, u.request_uri, **kw)
ownfoil  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 873, in urlopen
ownfoil  |     return self.urlopen(
ownfoil  |            ^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 873, in urlopen
ownfoil  |     return self.urlopen(
ownfoil  |            ^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 873, in urlopen
ownfoil  |     return self.urlopen(
ownfoil  |            ^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py",                                                                                                                                                line 843, in urlopen
ownfoil  |     retries = retries.increment(
ownfoil  |               ^^^^^^^^^^^^^^^^^^
ownfoil  |   File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line                                                                                                                                                519, in increment
ownfoil  |     raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-                                                                                                                                               type]
ownfoil  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ownfoil  | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='productionresult                                                                                                                                               ssa10.blob.core.windows.net', port=443): Max retries exceeded with url: /actions-result                                                                                                                                               s/2ada46cc-a100-4803-a377-30eb9d6661af/workflow-job-run-ca395085-040a-526b-2ce8-bdc85f6                                                                                                                                               92774/artifacts/dd3abbb97c2553ba49b1dfbcf1df6edda8f5170ed6065632f93de2dcdcc26da4.zip?rs                                                                                                                                               cd=attachment%3B+filename%3D%22titledb.zip%22&se=2024-11-23T02%3A37%3A28Z&sig=82FaqcRCR                                                                                                                                               a4UPqaKTEn4kVMpXZVFkMqsdRRUcF%2FEXyc%3D&ske=2024-11-23T11%3A57%3A27Z&skoid=ca7593d4-ee4                                                                                                                                               2-46cd-af88-8b886a2f84eb&sks=b&skt=2024-11-22T23%3A57%3A27Z&sktid=398a6654-997b-47e9-b1                                                                                                                                               2b-9515b896b4de&skv=2024-11-04&sp=r&spr=https&sr=b&st=2024-11-23T02%3A27%3A23Z&sv=2024-                                                                                                                                               11-04 (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7                                                                                                                                               89d76c05910>: Failed to resolve 'productionresultssa10.blob.core.windows.net' ([Errno -                                                                                                                                               3] Try again)"))
ownfoil exited with code 1
root@dock-fu:~/ownfoil# ls -l
total 12
drwxr-xr-x 2 c-fu homelab 4096 Nov 23 10:27 config
-rw-r--r-- 1 root root     328 Nov 23 10:27 docker-compose.yml
drwxr-xr-x 2 root root    4096 Nov 23 10:27 games #<-------- DIDN'T GET CHANGED

root@dock-fu:~/ownfoil# chown c-fu:homelab games
root@dock-fu:~/ownfoil# ls -l
total 12
drwxr-xr-x 2 c-fu homelab 4096 Nov 23 10:28 config
-rw-r--r-- 1 root root     328 Nov 23 10:27 docker-compose.yml
drwxr-xr-x 2 c-fu homelab 4096 Nov 23 10:28 games #<---------FIXED
root@dock-fu:~/ownfoil# dc up -d --force-recreate
WARN[0000] /root/ownfoil/docker-compose.yml: the attribute `version` is obsolete, it wi                                                                                                                                               ll be ignored, please remove it to avoid potential confusion
[+] Running 2/2
 ✔ Network games_net  Created                                                     0.2s
 ✔ Container ownfoil  Started                                                     0.5s

root@dock-fu:~/ownfoil# dc logs -f
WARN[0000] /root/ownfoil/docker-compose.yml: the attribute `version` is obsolete, it wi                                                                                                                                               ll be ignored, please remove it to avoid potential confusion
ownfoil  | Starting ownfoil
ownfoil  | [2024-11-23 02:30:55.168] INFO (app) Starting initialization of Ownfoil...
ownfoil  | [2024-11-23 02:30:55.168] INFO (app) Initializing File Watcher...
ownfoil  | [2024-11-23 02:30:55.170] INFO (app) Loading initial configuration...
ownfoil  | [2024-11-23 02:30:55.171] DEBUG (settings) Reading configuration file.
ownfoil  | [2024-11-23 02:30:55.175] DEBUG (settings) Keys file /app/config/keys.txt do                                                                                                                                               es not exist.
ownfoil  | [2024-11-23 02:30:55.175] INFO (file_watcher) Adding directory /games to wat                                                                                                                                               chdog.
ownfoil  | [2024-11-23 02:30:55.177] INFO (titledb) Updating titledb...
ownfoil  | [2024-11-23 02:30:57.974] INFO (titledb) Retrieving titledb for the first ti                                                                                                                                               me...
ownfoil  | [2024-11-23 02:30:57.975] INFO (titledb) Downloading cnmts.json from remote                                                                                                                                                titledb to data/titledb/cnmts.json
ownfoil  | [2024-11-23 02:31:14.292] INFO (titledb) Downloading versions.json from remo                                                                                                                                               te titledb to data/titledb/versions.json
ownfoil  | [2024-11-23 02:31:15.614] INFO (titledb) Downloading versions.txt from remot                                                                                                                                               e titledb to data/titledb/versions.txt
ownfoil  | [2024-11-23 02:31:16.932] INFO (titledb) Downloading languages.json from rem                                                                                                                                               ote titledb to data/titledb/languages.json
ownfoil  | [2024-11-23 02:31:17.435] INFO (titledb) Downloading titles.US.en.json from                                                                                                                                                remote titledb to data/titledb/titles.US.en.json

^Ccanceled

As for the resolve hostname issue, I believe it's an alpine issue:
https://stackoverflow.com/questions/47244229/haskell-hostname-resolution-inside-alpine-docker-image-does-not-work

Potential solution: https://stackoverflow.com/questions/53356500/cant-resolve-set-hostname-from-another-docker-container-in-same-network

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

No branches or pull requests

1 participant