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

[BUG] service name "changedetection.io" in readme docker compose example causes errors #21

Closed
1 task done
nopoz opened this issue Jun 5, 2024 · 1 comment · Fixed by #22
Closed
1 task done

Comments

@nopoz
Copy link
Contributor

nopoz commented Jun 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The readme uses changedetection.io as the service name in the docker compose example. This causes a DNS resolution problem with the container's built-in example check for https://changedetection.io/CHANGELOG.txt. The container will resolve the hostname changedetection.io to the IP of the container rather than the desired external IP:

Using the current docker compose example:

---
services:
  changedetection.io:
    image: lscr.io/linuxserver/changedetection.io:latest
    container_name: changedetection
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - BASE_URL= #optional
      - PLAYWRIGHT_DRIVER_URL= #optional
    volumes:
      - /path/to/changedetection/config:/config
    ports:
      - 5000:5000
    restart: unless-stopped

Checking the name resolution with ping inside the container you get the incorrect IP of the container itself:

# docker exec -t -i changedetection /bin/bash
root@changedetection:/# ping changedetection.io
PING changedetection.io (172.20.0.3): 56 data bytes
64 bytes from 172.20.0.3: seq=0 ttl=64 time=0.042 ms
64 bytes from 172.20.0.3: seq=1 ttl=64 time=0.041 ms
64 bytes from 172.20.0.3: seq=2 ttl=64 time=0.039 ms

This could lead user to think there is something wrong within the container or it's settings, when it's just a docker DNS problem.

This can be fixed by changing the default docker compose service name from changedetection.io to changedetection:

---
services:
  changedetection:
    image: lscr.io/linuxserver/changedetection.io:latest
    container_name: changedetection
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - BASE_URL= #optional
      - PLAYWRIGHT_DRIVER_URL= #optional
    volumes:
      - /path/to/changedetection/config:/config
    ports:
      - 5000:5000
    restart: unless-stopped

After modification and checking name resolution in the container you get the correct external IP:

# docker exec -t -i changedetection /bin/bash
root@c89c27bb21f8:/# ping changedetection.io
PING changedetection.io (67.223.101.61): 56 data bytes
64 bytes from 67.223.101.61: seq=0 ttl=55 time=57.553 ms
64 bytes from 67.223.101.61: seq=1 ttl=55 time=57.497 ms

Expected Behavior

No response

Steps To Reproduce

see description

Environment

- OS:
- How docker service was installed:

CPU architecture

x86-64

Docker creation

see description

Container logs

see description
Copy link

github-actions bot commented Jun 5, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@nopoz nopoz mentioned this issue Jun 5, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant