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

Unable to evaluate localhost via Docker container #101

Open
larrybotha opened this issue Aug 2, 2022 · 1 comment
Open

Unable to evaluate localhost via Docker container #101

larrybotha opened this issue Aug 2, 2022 · 1 comment

Comments

@larrybotha
Copy link

larrybotha commented Aug 2, 2022

Problem

When building and running a Docker container for linkcheck, evaluating localhost:[port] on the host always results in connection failed

  • Expected: site to be crawled
  • Actual: linkchecker reports connection failed

Steps to reproduce

  1. create a Dockerfile using the following:
    FROM tennox/linkcheck
  2. build an image from the Dockerfile $ docker build --platform linux/arm64 -t filiph/linkcheck .
  3. run a server at some port from the host
  4. evaluate the server via the docker container using $ docker run --rm -it filiph/linkcheck :[port]

Additional info

Running linkchecker after installing via homebrew / dart works as expected.

With Docker, I've also attempted the following URLs:

System settings

  • Mac OS 12.5 (M1)
  • Docker: Docker for desktop v4.11.0 / Docker v20.10.17
  • linkcheck version:

EDIT: updated Docker image to be built from latest available tag at Docker hub /tennox/linkcheck

@xakraz
Copy link

xakraz commented Feb 9, 2023

✋🏻 I am facing the exact same issue.

What is strange is I think it was running fine a few days ago and not today 🤔

linkcheck version 2.0.20

My usage

On a Linux host

docker-compose up <my-service>
-> binds in 8000:8000
docker run --rm \
	--network=host \
	-v "${PWD}/tools/linkcheck/:/skipfiles/" \
	tennox/linkcheck :8000 --skip-file /skipfiles/skip_files.txt

Crawling...

Provided URLs failing:
http://localhost:8000/ (connection failed)


Stats:
       0 links
       1 destination URLs
       0 URLs ignored
       0 warnings
       1 errors

make: *** [Makefile:115: test-live-links] Error 2

Despite the fact that, within the linkcheck container

# curl -I  http://localhost:8000

HTTP/1.0 200 OK
Date: Thu, 09 Feb 2023 19:05:16 GMT
Server: WSGIServer/0.2 CPython/3.9.2
Content-Type: text/html
Content-Length: 80749

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

2 participants